-
Notifications
You must be signed in to change notification settings - Fork 27
/
setup.py
58 lines (50 loc) · 1.62 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
import os
import os.path
import sys
import setuptools
CFLAGS = ['-Wall', '-Wsign-compare', '-Wconversion']
if sys.platform in ('win32', 'cygwin', 'cli'):
raise RuntimeError('ptracer is a Unix-only library')
with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as f:
readme = f.read()
with open(os.path.join(
os.path.dirname(__file__), 'ptracer', '__init__.py')) as f:
for line in f:
if line.startswith('__version__ ='):
_, _, version = line.partition('=')
VERSION = version.strip(" \n'\"")
break
else:
raise RuntimeError(
'unable to read the version from ptracer/__init__.py')
setuptools.setup(
name='ptracer',
version=VERSION,
description='On-demand system call tracing for Python programs.',
long_description=readme,
classifiers=[
'License :: OSI Approved :: Apache Software License',
'Intended Audience :: Developers',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Operating System :: POSIX :: Linux',
'Development Status :: 4 - Beta',
],
platforms=['POSIX'],
license='Apache License, Version 2.0',
provides=['ptracer'],
packages=['ptracer', 'ptracer.ptrace'],
ext_modules=[
setuptools.Extension(
'ptracer._lltraceback',
['ptracer/_lltraceback.c'],
extra_compile_args=CFLAGS,
),
setuptools.Extension(
'ptracer.ptrace._ptrace',
['ptracer/ptrace/_ptrace.c'],
extra_compile_args=CFLAGS,
)
],
test_suite='tests.suite',
)