[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1005043: lintian: check that Python version numbers are not 0.0.0



On Sat, Feb 05, 2022 at 04:42:57PM -0500, Sandro Tosi wrote:
> > The test for this bug (and it should probably be recorded as an error,
> > not just a warning, as no Python package should have a version number
> > of 0.0.0)
> 
> what exactly is the problem that would make it an 'error'?

When a package uses pkg_resources to determine the version number of
some package, it is returned the wrong information.  This is certainly
a packaging error: the upstream package, as installed by pip,
announces "this is version 1.2.3" but the Debian package announces
"this is version 0.0.0".

In the couple of cases I've looked at so far, it is due to the
upstream version using use_scm_version in setup.py.  This works fine
for a version that is in a Git repository, but it doesn't work for
Debian packages, as the Git version lookup fails.  So this needs to be
patched.

Perhaps a better way would be for dh_python3 to handle this by
"teaching" use_scm_version to look at debian/changelog, as this would
save 30+ packages having to continually update a setup.py patch.

What do you think?

Best wishes,

   Julian


Reply to: