forked from proteoTorch/proteoTorch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
69 lines (62 loc) · 2.45 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
#!/usr/bin/env python3
import sys
if (sys.version_info[0] == 3 and sys.version_info[1] < 0):
print("ProteoTorch requires Python version 3.0 or later")
sys.exit(1)
from setuptools import setup, find_packages
from Cython.Build import cythonize
from os import path
import subprocess
DISTNAME = 'ProteoTorch'
VERSION = '0.1.0'
DESCRIPTION = 'Deep semi-supervised learning for identification of shotgun proteomics data'
AUTHOR = 'John T. Halloran, Gregor Urban'
AUTHOR_EMAIL = 'johnhalloran321@gmail.com, gur9000@outlook.com'
URL = 'https://github.com/proteoTorch/proteoTorch'
LICENSE='OSL-3.0'
CLASSIFIERS = ["Natural Language :: English",
"Development Status :: 3 - Alpha",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: Open Software License 3.0 (OSL-3.0)",
"Topic :: Scientific/Engineering :: Bio-Informatics",
"Operating System :: MacOS",
"Operating System :: Microsoft :: Windows",
"Operating System :: Unix",
"Programming Language :: Python :: 3 :: Only"]
def build_solvers():
""" Check if the solver library has been built. If not, run
make in the solvers directory
"""
if not path.exists(path.join('proteoTorch_solvers', 'libssl.so')):
try:
subprocess.check_call(['make'], cwd='proteoTorch_solvers')
except:
print("Could not build ProteoTorch SVM solver library")
def main():
build_solvers()
setup(
name=DISTNAME,
version=VERSION,
author=AUTHOR,
author_email=AUTHOR_EMAIL,
description=DESCRIPTION,
license=LICENSE,
packages=find_packages(include=["proteoTorch", "proteoTorch.pyfiles", "proteoTorch_solvers"]),
# packages=find_packages(include=["proteoTorch", "proteoTorch.*", proteoTorch_solvers"]),
url=URL,
platforms=['any'],
install_requires=[
'numpy',
'sklearn',
'torch',
'Cython'
],
package_data={'proteoTorch_solvers': ['libssl.so']},
classifiers=CLASSIFIERS,
ext_modules = cythonize("proteoTorch/cylibs/proteoTorch_qvalues.pyx",
build_dir="build"),
entry_points = {'console_scripts': ['proteoTorch = proteoTorch.analyze:main',
'proteoTorchPlot = proteoTorch.plotQvals:main']}
)
if __name__ == "__main__":
main()