forked from markmipt/biosaur2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
executable file
·62 lines (56 loc) · 2.26 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
#!/usr/bin/env python
'''
setup.py file for biosaur2
'''
import os
from setuptools import setup, find_packages, Extension
version = open('VERSION').readline().strip()
def make_extensions():
is_ci = bool(os.getenv("CI", ""))
include_diagnostics = False
try:
import numpy
except ImportError:
print("C Extensions require `numpy`")
raise
try:
from Cython.Build import cythonize
cython_directives = {
'embedsignature': True,
"profile": include_diagnostics
}
macros = []
if include_diagnostics:
macros.append(("CYTHON_TRACE_NOGIL", "1"))
if is_ci and include_diagnostics:
cython_directives['linetrace'] = True
extensions = cythonize([
Extension(name='biosaur2.cutils', sources=['biosaur2/cutils.pyx'],
include_dirs=[numpy.get_include(), ])
], compiler_directives=cython_directives)
except ImportError:
extensions = [
Extension(name='biosaur2.cutils', sources=['biosaur2/cutils.c'],
include_dirs=[numpy.get_include(), ])
]
return extensions
setup(
name = 'biosaur2',
version = version,
description = '''A feature detection LC-MS1 spectra.''',
long_description = (''.join(open('README.md').readlines())),
long_description_content_type = 'text/markdown',
author = 'Mark Ivanov',
author_email = '[email protected]',
install_requires = [line.strip() for line in open('requirements.txt')],
ext_modules = make_extensions(),
classifiers = ['Intended Audience :: Science/Research',
'Programming Language :: Python :: 3.9',
'Topic :: Education',
'Topic :: Scientific/Engineering :: Bio-Informatics',
'Topic :: Scientific/Engineering :: Chemistry',
'Topic :: Scientific/Engineering :: Physics'],
license = 'License :: OSI Approved :: Apache Software License',
packages = find_packages(),
entry_points = {'console_scripts': ['biosaur2 = biosaur2.search:run',]}
)