* FC Stegerman <
f...@obfusk.net> [2023-02-03 17:58]:
Again, I'm not sure what is considered best practice here, but
something like this should work:
adding this to debian/rules
export PARAM_PACKAGE_VERSION := $(shell dpkg-parsechangelog -S Version)
and patching setup.py to change
def get_setup_version(reponame):
"""Use autover to get up to date version."""
# importing self into setup.py is unorthodox, but param has no
# required dependencies outside of python
from param.version import Version
return Version.setup_version(os.path.dirname(__file__),reponame,archive_commit="$Format:%h$")
to e.g.
def get_setup_version(reponame):
"""Use autover to get up to date version."""
if version := os.environ.get("PARAM_PACKAGE_VERSION"):
return version.split("-", 1)[0]
# importing self into setup.py is unorthodox, but param has no
# required dependencies outside of python
from param.version import Version
return Version.setup_version(os.path.dirname(__file__),reponame,archive_commit="$Format:%h$")
- FC