-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
80 lines (71 loc) · 2.38 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
# setup.py for planar
#
# $Id$
import os
import sys
import shutil
from distutils.core import setup, Extension
try:
from distutils.command.build_py import build_py_2to3 as build_py
except ImportError:
if sys.version_info >= (3, 0):
raise ImportError("build_py_2to3 not found in distutils - it is required for Python 3.x")
from distutils.command.build_py import build_py
suffix = ""
else:
suffix = "-py3k"
srcdir = os.path.dirname(__file__)
def read(fname):
return open(os.path.join(srcdir, fname)).read()
include_dirs = ['include']
extra_compile_args = []
if 'SETUP_PY_CFLAGS' in os.environ:
# SETUP_PY_CFLAGS allows you to pass in CFLAGS
# in a disutils-friendly way. Using CFLAGS directly
# causes linking to fail for some python versions
extra_compile_args.append(os.environ['SETUP_PY_CFLAGS'])
setup(
name='polypaths_planar_override',
version='0.4', # *** REMEMBER TO UPDATE __init__.py ***
description='tweaked version of planar for use in app',
provides=['polypaths_planar_override'],
author='AP',
author_email='[email protected]',
url='https://github.com/apolcyn/polypaths_planar_override.git',
license='BSD',
classifiers = [
'Development Status :: 3 - Alpha',
'Topic :: Software Development :: Libraries',
'Topic :: Software Development :: Libraries :: Python Modules',
'License :: OSI Approved :: BSD License',
'Intended Audience :: Developers',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.1',
'Operating System :: MacOS :: MacOS X',
'Operating System :: Microsoft :: Windows',
'Operating System :: POSIX',
],
platforms = 'any',
package_dir={'polypaths_planar_override': 'lib/polypaths_planar_override'},
packages=['polypaths_planar_override'],
#ext_modules=[
# Extension('planar.c',
# ['lib/planar/cmodule.c',
# 'lib/planar/cvector.c',
# 'lib/planar/ctransform.c',
# 'lib/planar/cline.c',
# 'lib/planar/cbox.c',
# 'lib/planar/cpolygon.c',
# ],
# include_dirs=include_dirs,
# #library_dirs=library_dirs,
# #libraries=libraries,
# #extra_link_args=extra_link_args,
# extra_compile_args=extra_compile_args,
# #define_macros=macros,
# ),
#],
cmdclass = {'build_py': build_py},
)