-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set up setuptools_scm and move most package configuration to pyproject.toml.
- Loading branch information
Showing
3 changed files
with
53 additions
and
72 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,59 @@ | ||
[build-system] | ||
requires = [ | ||
"setuptools>=42", | ||
"wheel" | ||
] | ||
requires = ["setuptools>=64", "setuptools-scm>=8"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "petab_select" | ||
dynamic = ["version"] | ||
maintainers = [ | ||
{name = "Dilan Pathirana", email = "[email protected]"}, | ||
] | ||
authors = [ | ||
{name = "The PEtab Select developers"}, | ||
] | ||
description = "PEtab Select: an extension to PEtab for model selection." | ||
readme = "README.md" | ||
requires-python = ">=3.10" | ||
license = {text = "BSD-3-Clause"} | ||
dependencies = [ | ||
# TODO minimum versions | ||
"more-itertools", | ||
"numpy", | ||
"pandas", | ||
"petab", | ||
"pyyaml", | ||
"click", | ||
"dill", | ||
] | ||
[project.optional-dependencies] | ||
test = [ | ||
"pytest >= 5.4.3", | ||
"pytest-cov >= 2.10.0", | ||
"amici >= 0.11.25", | ||
"fides >= 0.7.5", | ||
"pypesto > 0.2.13", | ||
] | ||
doc = [ | ||
"sphinx>=3.5.3,<7", | ||
"sphinxcontrib-napoleon>=0.7", | ||
"sphinx-markdown-tables>=0.0.15", | ||
"sphinx-rtd-theme>=0.5.1", | ||
"recommonmark>=0.7.1", | ||
# pin until ubuntu comes with newer pandoc: | ||
# /home/docs/checkouts/readthedocs.org/user_builds/petab-select/envs/63/lib/python3.11/site-packages/nbsphinx/__init__.py:1058: RuntimeWarning: You are using an unsupported version of pandoc (2.9.2.1). | ||
# Your version must be at least (2.14.2) but less than (4.0.0). | ||
"nbsphinx==0.9.1", | ||
"nbconvert<7.5.0", | ||
"ipython>=7.21.0", | ||
"readthedocs-sphinx-ext>=2.2.5", | ||
"sphinx-autodoc-typehints", | ||
] | ||
|
||
[project.scripts] | ||
petab_select = "petab_select.cli:cli" | ||
|
||
[tool.setuptools_scm] | ||
|
||
[tool.black] | ||
line-length = 79 | ||
target-version = ['py37', 'py38', 'py39'] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
import os | ||
import re | ||
import sys | ||
|
||
from setuptools import find_packages, setup | ||
|
||
|
@@ -30,77 +29,12 @@ def absolute_links(txt): | |
return txt | ||
|
||
|
||
minimum_python_version = '3.10' | ||
if sys.version_info < tuple(map(int, minimum_python_version.split('.'))): | ||
sys.exit(f'PEtab Select requires Python >= {minimum_python_version}') | ||
|
||
# read version from file | ||
__version__ = '' | ||
version_file = os.path.join('petab_select', 'version.py') | ||
# sets __version__ | ||
exec(read(version_file)) # pylint: disable=W0122 # nosec | ||
|
||
ENTRY_POINTS = { | ||
'console_scripts': [ | ||
'petab_select = petab_select.cli:cli', | ||
] | ||
} | ||
|
||
# project metadata | ||
# noinspection PyUnresolvedReferences | ||
setup( | ||
name='petab_select', | ||
version=__version__, | ||
description='PEtab Select: an extension to PEtab for model selection.', | ||
long_description=absolute_links(read('README.md')), | ||
long_description_content_type="text/markdown", | ||
# author='The PEtab Select developers', | ||
# author_email='[email protected]', | ||
url=f'https://github.com/{org}/{repo}', | ||
packages=find_packages(exclude=['doc*', 'test*']), | ||
install_requires=[ | ||
# TODO minimum versions | ||
'more-itertools', | ||
'numpy', | ||
'pandas', | ||
'petab', | ||
'pyyaml', | ||
#'python-libsbml>=5.17.0', | ||
#'sympy', | ||
# required for CLI | ||
'click', | ||
'dill', | ||
# plotting | ||
#'matplotlib>=2.2.3', | ||
#'seaborn', | ||
], | ||
include_package_data=True, | ||
python_requires=f'>={minimum_python_version}', | ||
entry_points=ENTRY_POINTS, | ||
extras_require={ | ||
'test': [ | ||
'pytest >= 5.4.3', | ||
'pytest-cov >= 2.10.0', | ||
'amici >= 0.11.25', | ||
'fides >= 0.7.5', | ||
# FIXME | ||
'pypesto > 0.2.13', | ||
# 'pypesto @ git+https://github.com/ICB-DCM/pyPESTO.git@develop#egg=pypesto', | ||
], | ||
'doc': [ | ||
'sphinx>=3.5.3,<7', | ||
'sphinxcontrib-napoleon>=0.7', | ||
'sphinx-markdown-tables>=0.0.15', | ||
'sphinx-rtd-theme>=0.5.1', | ||
'recommonmark>=0.7.1', | ||
# pin until ubuntu comes with newer pandoc: | ||
# /home/docs/checkouts/readthedocs.org/user_builds/petab-select/envs/63/lib/python3.11/site-packages/nbsphinx/__init__.py:1058: RuntimeWarning: You are using an unsupported version of pandoc (2.9.2.1). | ||
# Your version must be at least (2.14.2) but less than (4.0.0). | ||
'nbsphinx==0.9.1', | ||
'nbconvert<7.5.0', | ||
'ipython>=7.21.0', | ||
'readthedocs-sphinx-ext>=2.2.5', | ||
'sphinx-autodoc-typehints', | ||
], | ||
}, | ||
) |