-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
130 lines (93 loc) · 2.19 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
#!/usr/bin/env python
"""
Setuptools configuration
"""
import sys
if sys.version_info < (3, 5, 0):
sys.stderr.write("ERROR: Python 3.5 or later is required.\n")
exit(1)
from pathlib import Path # noqa
from setuptools import setup, find_packages # noqa
sys.path.insert(0, "src")
from sample_klein_app import __version__ as version_string # noqa
#
# Options
#
name = "sample-klein-app"
description = "Sample Twisted Klein Application"
readme_path = Path(__file__).parent / "README.rst"
try:
long_description = readme_path.open().read()
except IOError:
long_description = None
url = "https://github.com/wsanchez/sample-klein-app"
author = "Wilfredo S\xe1nchez Vega"
author_email = "[email protected]"
license = ""
platforms = ["all"]
packages = find_packages(where="src")
classifiers = [
"Framework :: Twisted",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
]
#
# Entry points
#
entry_points = {
"console_scripts": [],
}
klein_applications = ("composite", "dns", "hello", "math")
for app in klein_applications:
entry_points["console_scripts"].append(
"sample_{app} = sample_klein_app.application.{app}:Application.main"
.format(app=app)
)
#
# Dependencies
#
setup_requirements = []
install_requirements = [
"Twisted>=16.6.0",
"klein",
]
extras_requirements = {}
#
# Set up Extension modules that need to be built
#
extensions = []
#
# Run setup
#
def main():
"""
Run :func:`setup`.
"""
setup(
name=name,
version=version_string,
description=description,
long_description=long_description,
url=url,
classifiers=classifiers,
author=author,
author_email=author_email,
license=license,
platforms=platforms,
packages=packages,
package_dir={"": "src"},
package_data={},
entry_points=entry_points,
scripts=[],
data_files=[],
ext_modules=extensions,
py_modules=[],
setup_requires=setup_requirements,
install_requires=install_requirements,
extras_require=extras_requirements,
)
#
# Main
#
if __name__ == "__main__":
main()