-
Notifications
You must be signed in to change notification settings - Fork 25
/
setup.py
76 lines (70 loc) · 2.26 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
"""
joshua
"""
from distutils.core import setup, Extension
from collections import namedtuple
import os
childsubreaper = Extension("childsubreaper", ["childsubreaper/childsubreaper.c"])
Module = namedtuple(
"Module",
["name", "desc", "requirements", "private_repos", "ext_modules", "platforms"],
)
all_modules = [
Module(
"joshua-client",
"Joshua Client - interface to a great big supercomputer",
["argparse", "foundationdb==6.3.18", "python-dateutil", "lxml"],
[],
[childsubreaper],
[
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX :: Linux",
],
),
Module(
"joshua",
"Joshua - a supercomputer that runs simulations of war^H^H^Hdatabases",
["argparse", "foundationdb==6.3.18", "subprocess32"],
[],
[childsubreaper],
["Operating System :: POSIX :: Linux"],
),
]
if "ARTIFACT" in os.environ:
if os.environ["ARTIFACT"] == "client":
modules = [all_modules[0]]
elif os.environ["ARTIFACT"] == "server":
modules = [all_modules[1]]
elif os.environ["ARTIFACT"] == "all":
modules = all_modules
else:
raise ValueError(f"Unknown artifact: {os.environ['ARTIFACT']}")
else:
modules = all_modules
for module in modules:
setup(
name=module.name,
version="1.8.0",
author="The FoundationDB Team",
author_email="[email protected]",
url="https://www.foundationdb.org",
description=module.desc,
long_description="How about a nice game of chess?",
packages=["joshua"],
package_data={"joshua": ["joshua/*.py"]},
install_requires=module.requirements,
dependency_links=module.private_repos,
ext_modules=module.ext_modules,
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
]
+ module.platforms
+ [
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: Implementation :: CPython",
],
)