forked from celiagg/celiagg
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
executable file
·93 lines (84 loc) · 3.3 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# The MIT License (MIT)
#
# Copyright (c) 2014-2016 WUSTL ZPLAB
# Copyright (c) 2016-2021 Celiagg Contributors
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#
# Authors: Erik Hvatum <[email protected]>
# John Wiggins <[email protected]>
import os
import sys
from numpy.distutils.core import setup
from numpy.distutils.misc_util import Configuration
# Disable text rendering with this option
if '--no-text-rendering' in sys.argv:
del sys.argv[sys.argv.index('--no-text-rendering')]
os.environ['CELIAGG_TEXT_RENDERING'] = '0'
else:
os.environ['CELIAGG_TEXT_RENDERING'] = '1'
os.environ['CELIAGG_USE_PKGCONFIG'] = '1'
if '--no-freetype-pkg-config' in sys.argv:
del sys.argv[sys.argv.index('--no-freetype-pkg-config')]
os.environ['CELIAGG_USE_PKGCONFIG'] = '0'
def configuration(parent_package='', top_path=None):
config = Configuration(None, parent_package, top_path)
config.set_options(
ignore_setup_xxx_py=True,
assume_default_configuration=True,
delegate_options_to_subpackages=True,
quiet=True)
config.add_subpackage('celiagg')
return config
with open('README.rst', 'r') as fp:
long_description = fp.read()
requires = ['numpy']
if sys.platform not in ('win32', 'cygwin'):
# Windows doesn't use FreeType.
requires.append('freetype')
setup(
name='celiagg',
configuration=configuration,
license='MIT',
version='2.1.0',
description='Anti-Grain Geometry for Python 3 with Cython',
long_description=long_description,
long_description_content_type='text/x-rst',
url='https://github.com/celiagg/celiagg',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Console',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Programming Language :: C++',
'Programming Language :: Cython',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Topic :: Software Development :: Libraries',
'Operating System :: Microsoft :: Windows',
'Operating System :: POSIX',
'Operating System :: Unix',
'Operating System :: MacOS',
],
requires=requires,
packages=['celiagg', 'celiagg.tests'],
package_data={
'celiagg': ['data/*'],
},
)