-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
112 lines (87 loc) · 3.18 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
from distutils.core import setup, Extension
import os.path
import interpreters
PROJECT_ROOT = os.path.abspath(os.path.dirname(__file__))
#################################################
# Define the package metadata.
NAME = 'interpreters'
VERSION = interpreters.__version__
AUTHOR = 'Eric Snow'
EMAIL = '[email protected]'
URL = 'https://github.com/ericsnowcurrently/interpreters'
LICENSE = 'New BSD License'
SUMMARY = "Python-level access to CPython's C-level subinterpreters API."
# DESCRIPTION is dynamically built below.
KEYWORDS = ''
PLATFORMS = []
CLASSIFIERS = [
#'Development Status :: 1 - Planning',
#'Development Status :: 2 - Pre-Alpha',
'Development Status :: 3 - Alpha',
#'Development Status :: 4 - Beta',
#'Development Status :: 5 - Production/Stable',
#'Development Status :: 6 - Mature',
#'Development Status :: 7 - Inactive',
'Intended Audience :: Developers',
#'License :: OSI Approved :: BSD License',
#'Operating System :: OS Independent',
#'Programming Language :: Python :: 2',
#'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
#'Programming Language :: Python :: 3.2',
#'Programming Language :: Python :: 3.3',
#'Programming Language :: Python :: 3.4',
#'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Topic :: Software Development',
'Topic :: Software Development :: Libraries',
]
with open(os.path.join(PROJECT_ROOT, 'README.rst')) as readme_file:
DESCRIPTION = readme_file.read()
#################################################
# Set up files.
PACKAGES = []
PACKAGE_DATA = {}
MODULES = ['interpreters.py']
EXTENSIONS = [
Extension('_interpreters',
['src/_interpretersmodule.c'],
include_dirs=['include'],
#define_macros=[('NDEBUG', '1')],
#undef_macros=['HAVE_FOO'],
),
],
#################################################
# Set up the rest of the package info.
REQUIRES = []
#################################################
# Pull it all together.
kwargs = {'name': NAME,
'version': VERSION,
'author': AUTHOR,
'author_email': EMAIL,
#'maintainer': MAINTAINER,
#'maintainer_email': MAINTAINER_EMAIL,
'url': URL,
#'download_url': DOWNLOAD,
'license': LICENSE,
'description': SUMMARY,
'long_description': DESCRIPTION,
'keywords': KEYWORDS,
'platforms': PLATFORMS,
'classifiers': CLASSIFIERS,
'requires': REQUIRES,
'packages': PACKAGES,
'package_data': PACKAGE_DATA,
'py_modules': MODULES,
'ext_modules': EXTENSIONS,
}
for key in list(kwargs):
if not kwargs[key]:
del kwargs[key]
if __name__ == '__main__':
if {'src', 'include'} - set(os.listdir(PROJECT_ROOT)):
raise Exception('missing extension module files; '
'please run python3 -m update')
setup(**kwargs)