On Fri, 19 Aug 2016 11:16:29 +0200 Piotr =?utf-8?Q?O=C5=BCarowski?=
<[email protected]> wrote:
> Control: tags -1 wontfix
>
> > I've been using dh-python to build a package and I've had to add a version
> > dependency in my setup.py (requests >= 2.4.2) but this isn't being picked up
> > and added to the debian/control.
>
> dh_python{2,3} ignores version on purpose. It does more than that, it
> removes recognized dependency from requires.txt so the version is
> ignored later by pkg_resources as well. I'm sure Python guys hate me for that.
>
> There was PEP386, there is PEP440 and plenty of other related PEPs or
> ideas on how to handle versions. The other thing is to put latest or
> unreleased version into install_requires (AKA requires.txt AKA Requires 
> header)
> just because that's the version upstream worked with during development.

I think this is the wrong approach. A too-tight dependency is a
problem, but too-lax ones are a problem too. At least for lower
bounds. Upper bounds are a bit more problematic and package
maintainers should remove the upper bounds where they make no sense.
But they are very reasonable if the module is following semantic
versioning, and the upper bound is on the next major version.

> Until I'm convinced that they finally figured that out and the exception
> is when an upstream project doesn't follow the standard rather than when
> it actually follows it - Debian maintainer will have to confirm that
> upstream is sane WRT versioning to get it copied/translated into Debian
> dependency (and to do that: pydist file with "PEP386" flag has to be
> installed or maintainers have to add versioned build dependency - which
> is my preferred solution as in most cases that version is required for
> tests during build anyway)

See #841314, the versioned build-dep is not propagated to the binary package.


> PS I heard some rumors that PyPI will enforce one of the standards, but
>    I don't know the status of that


According to the python packaging doc, all modules must satisfy PEP440[1]

[1] 
https://packaging.python.org/distributing/#standards-compliance-for-interoperability


Saludos

Reply via email to