Piotr Ożarowski <pi...@debian.org> writes:

> this one worked perfectly fine for me (tested with dh_python2 1.20141111-2)
> so I assumed you pointed us to a wrong example

What do you mean by “worked perfectly”? Remember that the problem I'm
encountering is that the package builds successfully, but with
‘${python:Depends}’ containing none of the dependencies declared in the
Setuptools script.

The Setuptools script definitely sets ‘install_requires’ in the ‘setup’

$ dget -x 
dget: retrieving
dpkg-source: info: extracting mullvad-client in mullvad-client-60+dfsg.1

$ cd mullvad-client-60+dfsg.1/

$ python2 -c "
import setuptools
def report_install_requires(**kwargs):
setuptools.setup = report_install_requires
import setup
['appdirs', 'ipaddr', 'netifaces', 'psutil', 'wxPython']


So that should be what ‘dh-python’ needs to infer dependencies for the
‘${python:Depends}’, yes?

That's not what happens though:

$ cat debian/control
Package: mullvad-client
Architecture: all

$ dpkg-buildpackage -A
dpkg-deb: building package 'mullvad-client' in 

$ dpkg-deb --info ../mullvad-client_60+dfsg.1-1_all.deb
 Depends: python-pkg-resources, python, openvpn, resolvconf


Note that the “Depends” field has replaced ‘${python:Depends}’ with
nothing, where I would expect all the corresponding packages to satisfy
‘install_requires’ from Setuptools.

So that's the problem: Setuptools gets packages named in
‘install_requires’, yet ‘dh_python2’ is not using that for Debian
package dependencies in the ‘${python:Depends}’ substitution.

Do you get different behaviour from building that package?

How am I meant to tell ‘dh_python2’ to replace the ‘${python:Depends}’
with what the upstream Setuptools script declares are its dependencies?

 \          “Generally speaking, the errors in religion are dangerous; |
  `\    those in philosophy only ridiculous.” —David Hume, _A Treatise |
_o__)                                           of Human Nature_, 1739 |
Ben Finney

Reply via email to