-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathsetup.py
50 lines (43 loc) · 1.39 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
import setuptools
import platform
if platform.python_implementation() == 'PyPy':
options = {'py_modules': ['numa']}
else:
try:
from Cython.Distutils import build_ext
source_file = "numa.pyx"
cython_available = True
except ImportError:
source_file = "numa.c"
cython_available = False
options = {'ext_modules': [
setuptools.Extension("numa",
[source_file],
libraries=["numa"],
define_macros=[('NUMA_VERSION1_COMPATIBILITY', 1)],
)
]
}
if cython_available:
options['cmdclass'] = {"build_ext": build_ext}
setuptools.setup(
name="numa",
version='1.4.6',
description="Interface to numa(3) Linux API for Python",
author='Andrey Smirnov',
author_email='[email protected]',
url='http://github.com/smira/py-numa',
long_description='''
numa provides interface to numa(3) Linux APIs (version 1/2).
It allows to query NUMA state, change memory & scheduling policies.
Supports PyPy (via ctypes) and CPython (via Cython).
''',
license='MIT',
platforms=['any'],
classifiers=[
'Development Status :: 3 - Alpha',
'License :: OSI Approved :: MIT License',
'Operating System :: POSIX :: Linux',
],
**options
)