Skip to content

Commit

Permalink
move VERSION to package folder
Browse files Browse the repository at this point in the history
ensure its included in dist
  • Loading branch information
schuenke committed Oct 9, 2024
1 parent 72685df commit 1787dd5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/mrpro/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

0 comments on commit 1787dd5

Please sign in to comment.