diff --git a/pyproject.toml b/pyproject.toml index 6c9c4fcf..677e1881 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,11 +5,17 @@ build-backend = "setuptools.build_meta:__legacy__" [tool.setuptools-git-versioning] count_commits_from_version_file = true enabled = true -version_file = "VERSION" +version_file = "src/mrpro/VERSION" template = "{tag}{env:MRPROVERSIONSUFFIX:default ''}" dev_template = "{tag}+{branch}{sha}" dirty_template = "{tag}+dirty{sha}" +[tool.setuptools] +include-package-data = true + +[tool.setuptools.package-data] +"mrpro" = ["VERSION"] + [project] name = "mrpro" description = "MR image reconstruction and processing package specifically developed for PyTorch." diff --git a/VERSION b/src/mrpro/VERSION similarity index 100% rename from VERSION rename to src/mrpro/VERSION diff --git a/src/mrpro/__init__.py b/src/mrpro/__init__.py index ef825788..fb551e18 100644 --- a/src/mrpro/__init__.py +++ b/src/mrpro/__init__.py @@ -7,4 +7,4 @@ __version__ = version("package-name") except PackageNotFoundError: # package is not installed - __version__ = Path(__file__).parent.parent.parent.joinpath("VERSION").read_text().strip() + __version__ = Path(__file__).parent.joinpath("VERSION").read_text().strip()