-
Notifications
You must be signed in to change notification settings - Fork 6
/
setup.py
121 lines (102 loc) · 4.7 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
"""
CBMPy: setup.py
===============
PySCeS Constraint Based Modelling (http://cbmpy.sourceforge.net)
Copyright (C) 2010-2024 Brett G. Olivier, VU University Amsterdam, Amsterdam, The Netherlands
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>
Author: Brett G. Olivier PhD
Contact developers: https://github.com/SystemsBioinformatics/cbmpy/issues
Last edit: $Author: bgoli $ ($Id: setup.py 698 2019-07-30 14:03:26Z bgoli $)
"""
import os
import time
local_path = os.path.dirname(os.path.abspath(os.sys.argv[0]))
try:
from setuptools import setup
install_requires_src = ['numpy', 'packaging', 'pyparsing', 'python_libsbml', 'lxml', 'xlrd', 'xlwt', 'swiglpk', 'scipy', 'XlsxWriter']
extras_require_src = {
'all': ['sympy', 'numpy', 'packaging', 'pyparsing', 'python_libsbml', 'lxml', 'xlrd', 'xlwt', 'swiglpk', 'scipy', 'nose_py3', 'XlsxWriter'],
}
tests_require_src = ['numpy', 'packaging', 'pyparsing', 'python_libsbml', 'lxml', 'numpy', 'nose_py3']
except:
from distutils.core import setup
install_requires_src = []
extras_require_src = {}
tests_require_src = []
mydata_files = []
# release get version
vmaj = vmin = vmic = ''
with open(os.path.join(local_path, 'cbmpy', 'CBConfig.py')) as F:
for l in F:
if l.startswith('__VERSION_MAJOR__'):
vmaj = l.split('=')[1].strip()
elif l.startswith('__VERSION_MINOR__'):
vmin = l.split('=')[1].strip()
elif l.startswith('__VERSION_MICRO__'):
vmic = l.split('=')[1].strip()
mypackages = ['cbmpy', 'cbmpy.fluxmodules']
readme = """
CBMPy (https://systemsbioinformatics.github.io/cbmpy/) is a platform for constraint
based modelling and analysis. Its architecture is both extensible and flexible using
data structures that are intuitive to the biologist (metabolites, reactions, compartments)
while transparently translating these into the underlying mathematical structures used in
advanced analysis (LP's, MILP's).
CBMPy is fully compatible with the latest SBML3 Flux Balance Constraints (FBC) interoperability
specifications and implements popular analyses such as FBA, FVA, element/charge
balancing, network analysis and model editing as well as advanced methods
developed specifically for the ecosystem modelling: minimal distance methods,
flux minimization and input selection.
"""
description="""CBMPy: https://systemsbioinformatics.github.io/cbmpy/ is a platform for constraint based modelling. It implements popular FBA analyses, model editing and supports the latest SBML3FBC standards."""
setup(
package_dir={'cbmpy': 'cbmpy'},
packages=mypackages,
data_files=mydata_files,
long_description=description,
name="cbmpy",
summary="CBMPy: Constraint Based Modelling in Python",
version='{}.{}.{}'.format(vmaj, vmin, vmic),
maintainer='Brett G. Olivier',
author='Brett G. Olivier',
author_email='b.g.olivier@vu.nl',
maintainer_email='b.g.olivier@vu.nl',
url="https://systemsbioinformatics.github.io/cbmpy/",
download_url="https://github.com/SystemsBioinformatics/cbmpy/releases",
license="GNU General Public License (GPL)",
keywords="computational systems biology, modelling, simulation, genome scale models, sbml, constraint-based modelling, fbc, linear programming, groups, standard",
# zip_safe = False,
install_requires=install_requires_src,
extras_require=extras_require_src,
tests_require=tests_require_src,
platforms=["Windows", "Linux", "Mac"],
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Console',
'Intended Audience :: End Users/Desktop',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: GNU General Public License (GPL)',
'Natural Language :: English',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2',
'Topic :: Scientific/Engineering :: Bio-Informatics',
'Topic :: Scientific/Engineering :: Chemistry',
],
description=description,
)
try:
os.chdir(os.path.join(local_path, 'cbmpy', 'fluxmodules'))
print(os.getcwd())
import cbmpy
print(cbmpy.__version__)
os.chdir(local_path)
except ImportError:
pass