forked from vstinner/python-ptrace
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup_cptrace.py
executable file
·50 lines (39 loc) · 1.32 KB
/
setup_cptrace.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
#!/usr/bin/env python
SOURCES = ['cptrace/cptrace.c']
CLASSIFIERS = [
'Intended Audience :: Developers',
'Development Status :: 4 - Beta',
'Environment :: Console',
'License :: OSI Approved :: GNU General Public License (GPL)',
'Operating System :: OS Independent',
'Natural Language :: English',
'Programming Language :: C',
'Programming Language :: Python',
]
LONG_DESCRIPTION = open('doc/cptrace.rst').read()
def main():
from imp import load_source
from os import path
from sys import argv
if "--setuptools" in argv:
argv.remove("--setuptools")
from setuptools import setup, Extension
else:
from distutils.core import setup, Extension
cptrace_ext = Extension('cptrace', sources=SOURCES)
cptrace = load_source("version", path.join("cptrace", "version.py"))
install_options = {
"name": cptrace.PACKAGE,
"version": cptrace.VERSION,
"url": cptrace.WEBSITE,
"download_url": cptrace.WEBSITE,
"license": cptrace.LICENSE,
"author": "Victor Stinner",
"description": "python binding of ptrace written in C",
"long_description": LONG_DESCRIPTION,
"classifiers": CLASSIFIERS,
"ext_modules": [cptrace_ext],
}
setup(**install_options)
if __name__ == "__main__":
main()