-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathsetup.py
128 lines (119 loc) · 3.3 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
126
127
128
import os
import platform
from glob import glob
from setuptools import setup
from setuptools.extension import Extension
from Cython.Distutils import build_ext
import numpy
VERSION = "3.9.0"
NAME = "ms2pip"
LICENSE = "apache-2.0"
DESCRIPTION = "MS²PIP: MS² Peak Intensity Prediction"
AUTHOR = "Sven Degroeve, Ralf Gabriels, Kevin Velghe, Ana Sílvia C. Silva"
AUTHOR_EMAIL = "sven.degroeve@vib-ugent.be"
URL = "https://www.github.com/compomics/ms2pip_c"
PROJECT_URLS = {
"Documentation": "http://compomics.github.io/projects/ms2pip_c",
"Source": "https://github.com/compomics/ms2pip_c",
"Tracker": "https://github.com/compomics/ms2pip_c/issues",
"Webserver": "https://iomics.ugent.be/ms2pip/",
"Publication": "https://doi.org/10.1093/nar/gkz299/",
}
KEYWORDS = [
"MS2PIP",
"Proteomics",
"peptides",
"peak intensity prediction",
"spectrum",
"machine learning",
"spectral library",
"fasta2speclib",
]
CLASSIFIERS = [
"Intended Audience :: Science/Research",
"License :: OSI Approved :: Apache Software License",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3 :: Only",
"Topic :: Scientific/Engineering :: Bio-Informatics",
"Development Status :: 5 - Production/Stable",
]
INSTALL_REQUIRES = [
"biopython>=1.74,<2",
"numpy>=1.16,<2",
"pandas>=0.24,<2",
"pyteomics>=3.5,<5",
"scipy>=1.2,<2",
"tqdm>=4,<5",
"tables>=3.4",
"tomlkit>=0.5,<1",
"sqlalchemy>=1.3,<2",
"spectrum-utils>=0.3,<2",
"click>=7,<9",
"xgboost>=1.3,<2"
"matplotlib>=3.0",
"spectrum_utils>=0.3.5",
"lxml>=4",
]
PYTHON_REQUIRES = ">=3.6,<4"
with open("README.md", "r") as fh:
LONG_DESCRIPTION = fh.read()
to_remove = [
"ms2pip/cython_modules/ms2pip_pyx.c*",
"ms2pip/cython_modules/ms2pip_pyx.so",
]
#_ = [[os.remove(f) for f in glob(pat)] for pat in to_remove]
# Large machine-written C model files require optimization to be disabled
compile_args = {
"Linux": [
"-O0",
"-fno-var-tracking",
"-Wno-unused-result",
"-Wno-cpp",
"-Wno-unused-function",
],
"Darwin": [
"-O0",
],
"Windows": [
"/Od",
"/DEBUG",
"/GL-",
"/bigobj",
"/wd4244",
]
}
extensions = [
Extension(
"ms2pip.cython_modules.ms2pip_pyx",
sources=["ms2pip/cython_modules/ms2pip_pyx.pyx"] + glob("ms2pip/models/*/*.c"),
extra_compile_args=compile_args[platform.system()],
)
]
setup(
name=NAME,
version=VERSION,
license=LICENSE,
description=DESCRIPTION,
long_description=LONG_DESCRIPTION,
long_description_content_type="text/markdown",
author=AUTHOR,
author_email=AUTHOR_EMAIL,
url=URL,
project_urls=PROJECT_URLS,
keywords=KEYWORDS,
classifiers=CLASSIFIERS,
packages=["ms2pip", "ms2pip.ms2pip_tools", "fasta2speclib"],
include_package_data=True,
entry_points={
"console_scripts": [
"ms2pip=ms2pip.__main__:main",
"fasta2speclib=fasta2speclib.fasta2speclib:main",
"ms2pip-single-prediction=ms2pip.single_prediction:_main",
],
},
install_requires=INSTALL_REQUIRES,
python_requires=PYTHON_REQUIRES,
ext_modules=extensions,
include_dirs=[numpy.get_include()],
cmdclass={"build_ext": build_ext},
)