forked from man-group/mdf
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.py
63 lines (51 loc) · 1.74 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
import os
from setuptools import setup, find_packages
from distutils.extension import Extension
from Cython.Distutils import build_ext
from glob import glob
long_description = """.. -*-rst-*-
MDF - Data Flow Programming Toolkit
=======================================
"""
version = '2.2.1'
cython_profile = False
cdebug = False
with open("requirements.txt", "r") as f:
requirements = f.read().split(os.linesep)
if __name__ == "__main__":
extra_compile_args = []
extra_link_args = []
if cdebug:
extra_compile_args = ["/Zi"]
extra_link_args = ["/DEBUG"]
ext_modules = [
Extension("mdf.context", ["mdf/context.py"]),
Extension("mdf.nodes", ["mdf/nodes.py"]),
Extension("mdf.nodetypes", ["mdf/nodetypes.py"]),
Extension("mdf.ctx_pickle", ["mdf/ctx_pickle.py"]),
Extension("mdf.cqueue", ["mdf/cqueue.py"]),
]
for e in ext_modules:
e.pyrex_directives = {"profile": cython_profile}
e.extra_compile_args.extend(extra_compile_args)
e.extra_link_args.extend(extra_link_args)
setup(
name='mdf',
version=version,
description='MDF - Data Flow Programming Toolkit',
long_description=long_description,
zip_safe=False,
# The icons directory is not a python package so find_packages will not find it.
packages=find_packages() + ["mdf.viewer.icons"],
package_data={'mdf.viewer.icons': ['*.ico']},
test_suite='nose.collector',
setup_requires=[],
scripts=glob("bin/*.py"),
install_requires=requirements,
extras_require={
'win32': ['pywin32'],
'linux2': []
},
cmdclass={"build_ext": build_ext},
ext_modules=ext_modules,
)