From 51b5c67e463f521e2f61b486de77ce6390d4472b Mon Sep 17 00:00:00 2001 From: Jan Benda Date: Wed, 24 Apr 2024 12:16:28 +0200 Subject: [PATCH] added version module --- pyproject.toml | 17 ++++++++--------- src/numerix/__init__.py | 1 + src/numerix/version.py | 14 ++++++++++++++ 3 files changed, 23 insertions(+), 9 deletions(-) create mode 100644 src/numerix/version.py diff --git a/pyproject.toml b/pyproject.toml index 37a8345..6a5e295 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,12 +4,11 @@ build-backend = "setuptools.build_meta" [project] name = "numerix" -version = "1.0" -#dynamic = ["version"] +dynamic = ["version"] dependencies = [ "numpy", ] -requires-python = ">=3.2" +requires-python = ">=3.6" authors = [ {name = "Jan Benda", email = "jan.benda@uni-tuebingen.de"}, ] @@ -36,15 +35,15 @@ classifiers = [ "Topic :: Software Development :: Libraries :: Python Modules", ] -#[project.urls] -#Repository = "https://github.com/bendalab/thunderfish" -#Documentation = "https://bendalab.github.io/thunderfish" +[project.urls] +Repository = "https://whale.am28.uni-tuebingen.de/git/benda/packagehowto" +Documentation = "https://whale.am28.uni-tuebingen.de/git/benda/packagehowto/src/branch/master/README.md" #[project.scripts] -#thunderfish = "thunderfish.thunderfish:main" +#numerix = "numerix.numerix:main" -#[tool.setuptools.dynamic] -#version = {attr = "thunderfish.version.__version__"} +[tool.setuptools.dynamic] +version = {attr = "numerix.version.__version__"} #[tool.pytest.ini_options] #pythonpath = "src" diff --git a/src/numerix/__init__.py b/src/numerix/__init__.py index 2cec8f8..cb9977e 100644 --- a/src/numerix/__init__.py +++ b/src/numerix/__init__.py @@ -25,3 +25,4 @@ def add_four(x): # Functions from the modules of the package can be imported into the # namespace of the package: from .addition import add_two +from .version import __version__ diff --git a/src/numerix/version.py b/src/numerix/version.py new file mode 100644 index 0000000..1fbcbc2 --- /dev/null +++ b/src/numerix/version.py @@ -0,0 +1,14 @@ +""" Version and year of the numerix package. +""" + +__version__ = '1.4.2' +""" Current version of the numerix package as string 'x.y.z'. """ + +__year__ = '2024' +""" Year of the current numerix version as string. """ + +# Add them to documentation: +__pdoc__ = {} +__pdoc__['__version__'] = True +__pdoc__['__year__'] = True +