-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathsetup.py
75 lines (67 loc) · 1.92 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
import platform
import codecs
import os.path
import six
if six.PY2:
language_level ='2'
elif six.PY3:
language_level = '3'
else:
language_level = None
opsys = platform.system()
if opsys == 'Windows':
try:
from setuptools import setup
from setuptools import Extension
except ImportError:
from distutils.core import setup
from distutils.extension import Extension
else:
from distutils.core import setup
from distutils.extension import Extension
from Cython.Build import cythonize
def read(rel_path):
here = os.path.abspath(os.path.dirname(__file__))
with codecs.open(os.path.join(here, rel_path), 'r') as fp:
return fp.read()
def get_version(rel_path):
for line in read(rel_path).splitlines():
if line.startswith('__version__'):
delim = '"' if '"' in line else "'"
return line.split(delim)[1]
else:
raise RuntimeError("Unable to find version string.")
setup(
name='bioxtasraw',
version=get_version('./bioxtasraw/__init__.py'),
description='A package for processing biological small angle scattering data.',
url="https://bioxtas-raw.readthedocs.io/en/latest/",
packages=['bioxtasraw'],
install_requires=[
'numpy',
'scipy',
'matplotlib',
'pillow',
'numba',
'h5py',
'cython',
'numexpr',
'hdf5plugin',
'silx',
'fabio',
'reportlab',
'mmcif_pdbx',
'svglib',
'pyfai;python_version>"2.7"',
'pyfai==0.17;python_version=="2.7"',
'dbus-python;platform_system=="Linux"',
],
ext_modules=cythonize("bioxtasraw/sascalc_exts.pyx",
language_level=language_level),
entry_points={
'gui_scripts': [ 'bioxtas_raw = bioxtasraw.RAW:main'],
},
include_package_data=True,
)
# Run this command to build the extensions:
# python setup.py build_ext --inplace