-
Notifications
You must be signed in to change notification settings - Fork 4
/
setup.py
executable file
·94 lines (83 loc) · 2.98 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
#!/usr/bin/env python3
# -*- coding: UTF-8 -*-
"""Setup for PyPI usage."""
import sys
from glob import glob
from setuptools import setup
def get_long_description():
"""Get the package's long description."""
with open("README.md", "r") as ifstrm:
return ifstrm.read()
def get_version():
"""Get the package's version from without using an import."""
with open("src/reactomepy/__init__.py", "r") as ifstrm:
for line in ifstrm:
if line[:15] == "__version__ = '":
return line.rstrip()[15:-1]
def get_install_requires():
"""Get requirements for installation."""
# pip: User installs items in requirements.txt
base = ['enrichmentanalysis_dvklopfenstein', 'requests']
# conda: Anaconda installs all needed to run scripts
if sys.argv[1:2] == ['bdist_conda']:
pkgs = [
'neobolt',
'neo4j-python-driver',
]
base.extend(pkgs)
return base
def get_distclass():
"""If building for anaconda, get CondaDistribution class."""
if sys.argv[1:2] != ['bdist_conda']:
return None
from distutils.command.bdist_conda import CondaDistribution
return CondaDistribution
PACKAGES = [
'reactomepy',
'reactomepy.code',
'reactomepy.code.cli',
'reactomepy.code.enrich',
'reactomepy.code.ex',
'reactomepy.code.node',
'reactomepy.code.query',
'reactomepy.code.rest',
'reactomepy.code.run',
'reactomepy.code.schema',
'reactomepy.code.subdag',
'reactomepy.code.wrpy',
'reactomepy.data',
'reactomepy.data.all',
'reactomepy.data.pwy',
'reactomepy.work',
]
setup(
name='reactomepy',
version=get_version(),
author='DV Klopfenstein',
author_email='dvklopfenstein@gmail.com',
long_description=get_long_description(),
long_description_content_type="text/markdown",
packages=PACKAGES,
package_dir={p:'src/{PKG}'.format(PKG=p).replace('.', '/') for p in PACKAGES},
# include_package_data=True,
# package_data={"reactomepy.test_data.nbt_3102": ["*.*"]},
scripts=glob('src/bin/*.py') + glob('src/bin_neo4j/tutorial/*.py'),
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)',
'Programming Language :: Python :: 3',
'Topic :: Scientific/Engineering :: Bio-Informatics',
'Operating System :: OS Independent',
],
#distclass=get_distclass(),
url='http://github.com/dvklopfenstein/ReactomePy',
description='Explore biomolecular pathways in Reactome from the command line',
install_requires=get_install_requires(),
)
# We use the Neo4j Python driver is officially supported by Neo4j, called neo4j.
# https://neo4j.com/developer/python/
# https://github.com/neo4j/neo4j-python-driver
# These install the same package (neo4j is not listed as a Python Anaconda Python package):
# * pip install neo4j
# * conda install neo4j-python-driver