[Python-modules-team] Bug#896313: python-pymediainfo: pymediainfo fails to import

Antoine Beaupre anarcat at debian.org
Sun Apr 22 01:05:53 BST 2018


On Fri, Apr 20, 2018 at 10:01:07PM +0200, Helmut Grohne wrote:
> After installing python-pymediainfo importing the module pymediainfo
> into a python interpreter fails with the following error:
> 
> Traceback (most recent call last):
>   File "<string>", line 1, in <module>
>   File "/usr/lib/python2.7/dist-packages/pymediainfo/__init__.py", line 6, in <module>
>     from pkg_resources import get_distribution
> ImportError: No module named pkg_resources
> 
> The vast majority of import failures is attributed to missing dependencies.
> Often times that manifests as an ImportError or ModuleNotFoundError.
> Typically, dependencies should be inserted by dh-python via ${python:Depends}
> or ${python3:Depends}. Thus a missing dependency can be caused by incomplete
> install_requires in setup.py. Sometimes a missing dependency of a dependency
> is the cause, in such cases this bug should be reassigned.

I sent a naive patch upstream to add a dependency on pkg_resources but
of course that failed because that's just a syntetic package on Debian's
side: the pypi dependency is setuptools...

https://github.com/sbraz/pymediainfo/pull/50

So I don't quite understand how this can possibly happen: setuptools is
required to build the package in the first place, why can't dh-python
figure that out on its own?

It's a little strange to expect upstream to add a install_requires on
setuptools when it's part of the install process itself, ie. if you run
`setup.py install` (which is how dh-python builds the package), isn't it
reasonable from upstream to assume that setuptools will be installed at
that stage?

What should be done here?

A.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/python-modules-team/attachments/20180421/75c186b8/attachment.sig>


More information about the Python-modules-team mailing list