Public bug reported:
gdebi 0.9.5.8build1 (no-change rebuild, LP: #2132257) fails to build from
source in stonking-proposed (and previously resolute):
https://launchpad.net/ubuntu/+source/gdebi/0.9.5.8build1/+build/32793441
Build log:
https://launchpad.net/ubuntu/+source/gdebi/0.9.5.8build1/+build/32793441/+files/buildlog_ubuntu-stonking-amd64.gdebi_0.9.5.8build1_BUILDING.txt.gz
The build fails in 'debian/rules clean', before anything is built:
python3.14 setup.py clean
...
File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 370, in
_normalize_version
normalized = str(Version(version))
packaging.version.InvalidVersion: Invalid version: '0.9.5.8build1'
Root cause: setup.py takes the version from the first line of
debian/changelog and passes it verbatim to setup(version=...).
Debian/Ubuntu versions with suffixes such as 'build1' or 'ubuntu1' are
not valid PEP 440 versions, and current setuptools raises instead of
warning. 0.9.5.8 only worked because it happens to be PEP 440 compliant.
A retry or another no-change rebuild will not help; any Ubuntu upload
(e.g. 0.9.5.8ubuntu1) would hit the same failure without a source
change.
Proposed fix (gdebi is a native package, so directly in setup.py).
GDebi/Version.py keeps the full Debian version; only the value passed to
setuptools is trimmed to the leading numeric part:
--- orig/setup.py 2024-11-10 19:15:56.000000000 +0100
+++ gdebi-0.9.5.8build1/setup.py 2026-09-30 08:53:03.779314265 +0200
@@ -18,6 +18,9 @@
f=open('GDebi/Version.py', 'w')
f.write('VERSION="%s"\n' % version)
f.close()
+ # Debian/Ubuntu versions such as 0.9.5.8build1 or 0.9.5.8ubuntu1 are
+ # not valid PEP 440 versions; only pass the upstream part to setup().
+ version = compile(r'[0-9]+(\.[0-9]+)*').match(version).group(0)
for filepath in glob('po/mo/*/LC_MESSAGES/*.mo'):
lang = filepath[len('po/mo/'):]
Checked: setup.py --version now returns 0.9.5.8; 0.9.5.8build1,
0.9.5.8ubuntu1 and 0.9.5.8ubuntu0.24.04.1 all map to a valid 0.9.5.8.
The failing setuptools is not available locally and a full package build
has not been done yet.
This should also be forwarded to Debian (salsa debian/gdebi): Debian
binNMUs do not touch debian/changelog in the source, but any suffixed
Debian version (e.g. +nmu1) would hit it too.
** Affects: gdebi (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2168948
Title:
gdebi FTBFS: setup.py passes Debian version (0.9.5.8build1) to
setuptools, which rejects it as invalid PEP 440
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gdebi/+bug/2168948/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs