-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathsetup.py
More file actions
executable file
·30 lines (24 loc) · 799 Bytes
/
setup.py
File metadata and controls
executable file
·30 lines (24 loc) · 799 Bytes
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
#!/usr/bin/python3
import os
import sys
from setuptools import setup, Extension
if sys.version_info[0] == 2:
raise Exception('Python 2.x is no longer supported')
setup_dict = dict(
packages=[ 'cobs', 'cobs.cobs', 'cobs.cobsr', 'cobs._version', ],
package_dir={
'cobs' : 'src/cobs',
},
)
if not hasattr(sys, "pypy_version_info") and os.environ.get("COBS_PUREPYTHON"):
setup_dict['ext_modules'] = [
Extension('cobs.cobs._cobs_ext', [ 'src/ext/_cobs_ext.c', ]),
Extension('cobs.cobsr._cobsr_ext', [ 'src/ext/_cobsr_ext.c', ])
]
try:
setup(**setup_dict)
except KeyboardInterrupt:
raise
except:
del setup_dict['ext_modules']
setup(**setup_dict)