diff --git a/.gitignore b/.gitignore index 715b946..295fee5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ + +src/probfindiff/_version.py .idea # Byte-compiled / optimized / DLL files diff --git a/pyproject.toml b/pyproject.toml index b9be18b..4e2a0e7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,10 +2,22 @@ requires = [ "setuptools>=42", "wheel", + "setuptools_scm[toml]", ] build-backend = "setuptools.build_meta" +[tool.setuptools_scm] +local_scheme = "no-local-version" +write_to = "src/probfindiff/_version.py" +write_to_template = """ +# pylint: skip-file +# coding: utf-8 +# file generated by setuptools_scm +# don't change, don't track in version control +version = \"{version}\" +""" + # Configuration of the black code style checker # For more information about Black's usage of this file, see # https://github.com/psf/black#pyprojecttoml diff --git a/src/probfindiff/__init__.py b/src/probfindiff/__init__.py index 91ec64a..253f926 100644 --- a/src/probfindiff/__init__.py +++ b/src/probfindiff/__init__.py @@ -1,5 +1,6 @@ """Probabilistic numerical finite difference methods.""" + from ._toplevel_api import ( FiniteDifferenceScheme, backward, @@ -9,6 +10,7 @@ forward, from_grid, ) +from ._version import version as __version__ __all__ = [ "differentiate",