forked from dask/distributed
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
executable file
·105 lines (97 loc) · 3.03 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
94
95
96
97
98
99
100
101
102
103
104
105
#!/usr/bin/env python
import os
import sys
from setuptools import setup, find_packages
from setuptools.extension import Extension
import versioneer
requires = open("requirements.txt").read().strip().split("\n")
setup_requires = []
install_requires = []
extras_require = {}
for r in requires:
if ";" in r:
# requirements.txt conditional dependencies need to be reformatted for wheels
# to the form: `'[extra_name]:condition' : ['requirements']`
req, cond = r.split(";", 1)
cond = ":" + cond
cond_reqs = extras_require.setdefault(cond, [])
cond_reqs.append(req)
else:
install_requires.append(r)
cython_arg = None
for i in range(len(sys.argv)):
if sys.argv[i].startswith("--with-cython"):
cython_arg = sys.argv[i]
del sys.argv[i]
break
ext_modules = []
if cython_arg:
try:
import cython # noqa: F401
except ImportError:
setup_requires.append("cython")
profile = False
try:
_, param = cython_arg.split("=")
profile = param == "profile"
except ValueError:
pass
cyext_modules = [
Extension(
"distributed.scheduler",
sources=["distributed/scheduler.py"],
),
]
for e in cyext_modules:
e.cython_directives = {
"annotation_typing": True,
"binding": False,
"embedsignature": True,
"language_level": 3,
"profile": profile,
}
ext_modules.extend(cyext_modules)
setup(
name="distributed",
version=versioneer.get_version(),
cmdclass=versioneer.get_cmdclass(),
description="Distributed scheduler for Dask",
url="https://distributed.dask.org",
maintainer="Matthew Rocklin",
maintainer_email="[email protected]",
python_requires=">=3.6",
license="BSD",
package_data={
"": ["templates/index.html", "template.html"],
"distributed": ["http/templates/*.html"],
},
include_package_data=True,
setup_requires=setup_requires,
install_requires=install_requires,
extras_require=extras_require,
packages=find_packages(exclude=["*tests*"]),
ext_modules=ext_modules,
long_description=(
open("README.rst").read() if os.path.exists("README.rst") else ""
),
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Topic :: Scientific/Engineering",
"Topic :: System :: Distributed Computing",
],
entry_points="""
[console_scripts]
dask-ssh=distributed.cli.dask_ssh:go
dask-scheduler=distributed.cli.dask_scheduler:go
dask-worker=distributed.cli.dask_worker:go
""",
zip_safe=False,
)