Trouble with PyDist files and versioned dependencies
I have a python package that I want to depend on python-lxml (>= 3.3.1). So, I have put a .pydist file in debian/ containing. lxml python-lxml (>= 3.3.1) This gets installed in the package, but the package still has a unversioned dependency on python-lxml. Looking at the source code in /usr/share/dh-python/dhpython/pydist.py I can't quite tell if the functionality described in the documentation [1] is even implemented, let alone just broken. It simply just seems to only install the pydist file, and not consult the contents when deciding the details of the dependencies? Does anyone know what is going on here, and does anyone know of any packages that succeed on getting dh_python2 to make versioned dependencies? Thanks, Chris [1] Relevant part of man dh_python2 dependencies dh_python2 tries to translate Python dependencies from requires.txt file to Debian dependencies. Use debian/pydist-overrides or --no-guessing-deps option to over‐ ride it if the guess is incorrect. If you want dh_python2 to generate more strict dependencies (f.e. to avoid ABI problems) create debian/python-foo.pydist file. See /usr/share/doc/python-doc/README.PyDist (provided by python-doc package) for more information. If the pydist file contains PEP386 flag or set of (uscan like) rules, dh_python2 will make the depedency versioned (version requirements are ignored by default). -- To UNSUBSCRIBE, email to debian-python-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/55a4f141.1070...@cbaines.net
Re: Trouble with PyDist files and versioned dependencies
[Christopher Baines, 2015-07-14] > I have a python package that I want to depend on python-lxml (>= 3.3.1). > > So, I have put a .pydist file in debian/ containing. > lxml python-lxml (>= 3.3.1) .pydist file is used when other packages build depend on your package. (i.e. if you want to control what dependency other packages get, see f.e. sqlalchemy source package) What you want is debian/pydist-overrides file or to add correct Build-Dependency and wait few more days for me to fix #791433 -- 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 -- To UNSUBSCRIBE, email to debian-python-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/20150714113844.gr9...@sar0.p1otr.com
Re: Trouble with PyDist files and versioned dependencies
On 14/07/15 12:38, Piotr Ożarowski wrote: > [Christopher Baines, 2015-07-14] >> I have a python package that I want to depend on python-lxml (>= 3.3.1). >> >> So, I have put a .pydist file in debian/ containing. >> lxml python-lxml (>= 3.3.1) > > .pydist file is used when other packages build depend on your package. > (i.e. if you want to control what dependency other packages get, see > f.e. sqlalchemy source package) The dh_python2 manpage definitely suggests otherwise: dh_python2 tries to translate Python dependencies from requires.txt file to Debian dependencies. Use debian/pydist-overrides or --no-guessing-deps option to over‐ride it if the guess is incorrect. If you want dh_python2 to generate more strict dependencies (f.e. to avoid ABI problems) create debian/python-foo.pydist file. The guess was correct, just not strict enough. Hence I tried using the pydist file. > What you want is debian/pydist-overrides file or to add correct > Build-Dependency and wait few more days for me to fix #791433 I cannot find a description of what should be in a debian/pydist-overrides file. I tried just moving the pydist file, and that seemed to work. For completeness, I have debian/pydist-overrides containing: lxml python-lxml (>= 3.3.1) Thanks very much for your prompt and extremely useful help :) Chris -- To UNSUBSCRIBE, email to debian-python-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/55a4fbb3.8070...@cbaines.net