Closed Hook25 closed 1 month ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 43.38%. Comparing base (
ba754d6
) to head (16eaf7d
). Report is 10 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Description
By default we adopt the package version via setuptools scm. This tool reads the SETUPTOOLS_SCM_PRETEND_VERSION environment variable and, if it is provided, it adopts it as the version without doing any further calculation. This is useful to pre-compute the version before building like we do in snaps and debs. This mechanism seems to not be used on some versions of pybuild (the debian plugin we use to build the package) that ignores the setuptools-scm version and simply uses a
0.0.0
version string.This PR adopts the version from the variable in setup.py manually. Note that if the variable is not provided setuptools-scm is still used, preserving the functionality of "source" installs.
Resolved issues
Fixes: https://warthogs.atlassian.net/browse/CHECKBOX-1444 Fixes: https://github.com/canonical/checkbox/issues/1250
Documentation
This also adds a comment to explain why this is done.
Tests
To try this start a lxd container and build the package:
To verify that all went well run: