forked from msproteomicstools/msproteomicstools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
126 lines (110 loc) · 4.48 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
#!/usr/bin/env python
import os
import numpy
from setuptools import setup
from distutils.extension import Extension
from Cython.Build import cythonize
# get py-earth from https://github.com/jcrudy/py-earth/
import sys
with_cython = False
if "--with_cython" in sys.argv:
with_cython = True
sys.argv.remove("--with_cython")
# DO NOT FORGET TO BUMP THE VERSION IN version.py !!!!!!!!!!!!!!!!!!!
VERSION = (0, 10, 0)
# DO NOT FORGET TO BUMP THE VERSION IN version.py !!!!!!!!!!!!!!!!!!!
import fnmatch
all_scripts = []
for root, dirnames, filenames in os.walk('analysis'):
for filename in fnmatch.filter(filenames, '*.py'):
all_scripts.append(os.path.join(root, filename))
all_scripts.extend(["./gui/AlignmentGUI.py"])
all_scripts.extend(["./gui/TAPIR.py"])
extra_installs = []
ext_modules = []
if with_cython:
ext_modules = [
# we need C++11 for std::unordered_map
cythonize(Extension('msproteomicstoolslib.cython._optimized',
sources=["msproteomicstoolslib/cython/_optimized.pyx"],
language="c++", extra_compile_args=["-std=c++11"], extra_link_args=["-std=c++11"]))[0],
cythonize("msproteomicstoolslib/cython/LightTransformationData.pyx", language="c++")[0],
cythonize("msproteomicstoolslib/cython/_linear_interpol.pyx", language="c++")[0],
cythonize("msproteomicstoolslib/cython/PrecursorWrapper.pyx", language="c++")[0],
cythonize("msproteomicstoolslib/cython/PeakgroupWrapper.pyx", language="c++")[0],
cythonize("msproteomicstoolslib/cython/PrecursorGroup.pyx", language="c++")[0],
# cythonize("msproteomicstoolslib/cython/Precursor.pyx", language="c++")[0],
cythonize("msproteomicstoolslib/algorithms/alignment/DataCacher.pyx", language="c++")[0]
]
setup(name='msproteomicstools',
version="%d.%d.%d" % VERSION,
description='Tools for MS-based proteomics',
long_description='msproteomicstools - python module for MS-based proteomics',
url='https://github.com/msproteomicstools/msproteomicstools',
license='Modified BSD',
platforms=["any"],
classifiers=[
'Environment :: Console',
'Environment :: X11 Applications :: Qt',
'Intended Audience :: Science/Research',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Topic :: Documentation :: Sphinx',
'Operating System :: OS Independent',
# Supported Python versions:
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Topic :: Scientific/Engineering :: Bio-Informatics',
'Topic :: Scientific/Engineering :: Chemistry',
],
# Package and install info
scripts=all_scripts,
packages = ['msproteomicstoolslib',
"msproteomicstoolslib.cython",
"msproteomicstoolslib.algorithms",
"msproteomicstoolslib.algorithms.alignment",
"msproteomicstoolslib.algorithms.shared",
"msproteomicstoolslib.algorithms.PADS",
"msproteomicstoolslib.algorithms.graphs",
"msproteomicstoolslib.data_structures",
"msproteomicstoolslib.format",
"msproteomicstoolslib.math",
"msproteomicstoolslib.util",
"openswathgui",
"openswathgui.models",
"openswathgui.views",
],
package_dir = {
'openswathgui': 'gui/openswathgui',
},
package_data={'msproteomicstoolslib.data_structures':
['modifications_default.tsv']},
install_requires=[
"numpy",
"scipy",
"PyMSNumpress",
"cluster == 1.2.2", # note that 1.1.2 does not work with py3
"pyteomics >= 2.4.0",
"statsmodels >= 0.6.0",
"xlsxwriter >= 0.5.3 ", # for xlsx
# 'xlwt', # for xls
'scikits.datasmooth',
# versions 7.6 and 7.7 are broken for us (use spectra sanity check)
'pymzml == 0.7.8',
'lxml',
'configobj',
'biopython',
'xlwt',
] + extra_installs,
extras_require = {
'RSmoothing' : ["rpy2"]
},
ext_modules=ext_modules,
include_dirs=[numpy.get_include()],
test_suite="nose.collector",
tests_require="nose",
)