Skip to content

Commit

Permalink
Use setuptools_scm for package versions
Browse files Browse the repository at this point in the history
Removes some extra `build-system.requires` entries.
  • Loading branch information
dweindl committed Oct 15, 2024
1 parent 91ac49f commit 6680903
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 14 deletions.
8 changes: 7 additions & 1 deletion src/python/benchmark_models_petab/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,11 @@

from .base import get_problem, get_problem_yaml_path
from .C import MODEL_DIRS, MODELS, MODELS_DIR
from .version import __version__
from .overview import get_overview_df
from importlib.metadata import PackageNotFoundError, version

try:
__version__ = version("benchmark_models_petab")
except PackageNotFoundError:
# package is not installed
pass
3 changes: 0 additions & 3 deletions src/python/benchmark_models_petab/version.py

This file was deleted.

13 changes: 3 additions & 10 deletions src/python/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
[build-system]
requires = [
"setuptools",
"wheel",
"petab",
]
requires = ["setuptools>=64", "setuptools-scm>=8"]
build-backend = "setuptools.build_meta"


[project]
name = "benchmark_models_petab"
description = "A collection of models with experimental data in the PEtab format"
Expand All @@ -33,17 +28,15 @@ dependencies = [
[project.optional-dependencies]
dev = ["ruff"]

[tool.setuptools.dynamic]
version = {attr = "benchmark_models_petab.__version__"}

[project.scripts]
bmp-petablint = "benchmark_models_petab.check_petablint:main"
bmp-check-sbml-metadata = "benchmark_models_petab.check_sbml_metadata:main"
bmp-create-overview = "benchmark_models_petab.overview:main"

[tool.setuptools_scm]

[tool.ruff]
line-length = 79


[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"]

0 comments on commit 6680903

Please sign in to comment.