Skip to content
Snippets Groups Projects
Commit 2b674254 authored by Bert Palm's avatar Bert Palm 🎇
Browse files

changed versioneer style

parent 3dee58c3
No related branches found
No related tags found
1 merge request!716Rolling release
...@@ -12,7 +12,7 @@ markers = "slow: marks tests as slow (deselect with '-m \"not slow\"')" ...@@ -12,7 +12,7 @@ markers = "slow: marks tests as slow (deselect with '-m \"not slow\"')"
[tool.versioneer] [tool.versioneer]
VCS = "git" VCS = "git"
style = "pep440" style = "pep440-post"
versionfile_source = "saqc/_version.py" versionfile_source = "saqc/_version.py"
versionfile_build = "saqc/_version.py" versionfile_build = "saqc/_version.py"
tag_prefix = "v" tag_prefix = "v"
......
...@@ -14,14 +14,20 @@ with open("README.md", "r") as fh: ...@@ -14,14 +14,20 @@ with open("README.md", "r") as fh:
name = os.environ.get("PYPI_PKG_NAME", "saqc") name = os.environ.get("PYPI_PKG_NAME", "saqc")
if not name: if not name:
raise ValueError("Environment variable PYPI_PKG_NAME must not be an empty string.")
versions = versioneer.get_versions()
print(f"Building saqc: {versions}")
if versions["dirty"]:
raise ValueError( raise ValueError(
"Environment variable PYPI_PKG_NAME must not be an empty string." f"The repository you build is dirty. Please commit changes first {versions=}."
) )
version = versions["version"]
version = versioneer.get_version() if "post" in version and name == "saqc":
if "dirty" in version:
raise ValueError( raise ValueError(
f"The repository you build is dirty. Please commit changes first. {version=}" f"An saqc release must have version in the format X.Y.Z, "
f"which requires a git tag on the same commit. Please set "
f"a tag, then build again. {versions=}"
) )
setup( setup(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment