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

Re: Bug#834809: dh-python: requires.txt versions ignored when writing control



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.

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)


PS I heard some rumors that PyPI will enforce one of the standards, but
   I don't know the status of that
-- 
Piotr Ożarowski                         Debian GNU/Linux Developer
www.ozarowski.pl          www.griffith.cc           www.debian.org
GPG Fingerprint: 1D2F A898 58DA AF62 1786 2DF7 AEF6 F1A2 A745 7645


Reply to: