forked from PEtab-dev/libpetab-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
89 lines (79 loc) · 2.81 KB
/
setup.py
File metadata and controls
89 lines (79 loc) · 2.81 KB
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
from setuptools import setup, find_packages
import sys
import os
import re
def read(fname):
"""Read a file."""
return open(fname).read()
def absolute_links(txt):
"""Replace relative petab github links by absolute links."""
raw_base = "(https://raw.githubusercontent.com/"\
"petab-dev/libpetab-python/master/"
embedded_base = "(https://github.com/petab-dev/libpetab-python/"\
"tree/master/"
# iterate over links
for var in re.findall(r'\[.*?\]\((?!http).*?\)', txt):
if re.match(r'.*?.(png|svg)\)', var):
# link to raw file
rep = var.replace("(", raw_base)
else:
# link to github embedded file
rep = var.replace("(", embedded_base)
txt = txt.replace(var, rep)
return txt
# Python version check. We need >= 3.6 due to e.g. f-strings
if sys.version_info < (3, 7, 1):
sys.exit('PEtab requires at least Python version 3.7.1')
# read version from file
__version__ = ''
version_file = os.path.join('petab', 'version.py')
# sets __version__
exec(read(version_file)) # pylint: disable=W0122 # nosec
ENTRY_POINTS = {
'console_scripts': [
'petablint = petab.petablint:main',
'petab_visualize = petab.visualize.cli:_petab_visualize_main',
]
}
# project metadata
# noinspection PyUnresolvedReferences
setup(name='petab',
version=__version__,
description='Parameter estimation tabular data',
long_description=absolute_links(read('README.md')),
long_description_content_type="text/markdown",
author='The PEtab developers',
author_email='daniel.weindl@helmholtz-muenchen.de',
url='https://github.com/PEtab-dev/libpetab-python',
packages=find_packages(exclude=['doc*', 'test*']),
install_requires=['numpy>=1.15.1',
'pandas>=1.2.0',
'matplotlib>=3.5.0',
'python-libsbml>=5.17.0',
'sympy',
'colorama',
'seaborn',
'pyyaml',
'jsonschema',
],
include_package_data=True,
tests_require=['flake8', 'pytest', 'python-libcombine'],
python_requires='>=3.7.1',
entry_points=ENTRY_POINTS,
extras_require={
'reports': ['Jinja2'],
'combine': ['python-libcombine>=0.2.6'],
'doc': [
'sphinx>=3.5.3',
'sphinxcontrib-napoleon>=0.7',
'sphinx-markdown-tables>=0.0.15',
'sphinx-rtd-theme>=0.5.1',
'myst-parser>=0.16.1',
'nbsphinx>=0.8.2',
'm2r>=0.2.1',
'ipython>=7.21.0',
# https://github.com/spatialaudio/nbsphinx/issues/641
'Jinja2==3.0.3',
]
}
)