[Reproducible-builds] Bug#821777: Bug#821777: diffoscope fails with "pkg_resources.DistributionNotFound: python-magic"

Reiner Herrmann reiner at reiner-h.de
Tue Apr 19 21:50:30 UTC 2016

On Tue, Apr 19, 2016 at 10:25:41AM +0200, Holger Levsen wrote:
> $ diffoscope piuparts_0.70_source.changes piuparts_0.70~bpo8+1_source.changes
> Traceback (most recent call last):
>   File "/usr/bin/diffoscope", line 5, in <module>
>     from pkg_resources import load_entry_point
>   File "/usr/lib/python3/dist-packages/pkg_resources.py", line 2876, in <module>
>     working_set = WorkingSet._build_master()
>   File "/usr/lib/python3/dist-packages/pkg_resources.py", line 449, in build_master
>     ws.require(__requires__)
>   File "/usr/lib/python3/dist-packages/pkg_resources.py", line 745, in require
>     needed = self.resolve(parse_requirements(requirements))
>   File "/usr/lib/python3/dist-packages/pkg_resources.py", line 639, in resolve
>     raise DistributionNotFound(req)
> pkg_resources.DistributionNotFound: python-magic

As Mattia found out, this is because the requires.txt of the backported
diffoscope is non-empty.

It contains the lines:
> python-magic
> libarchive-c

... which are the dependencies listed in setup.py as install_requires.
On unstable, those lines are _also_ in requires.txt _before_ dh_python3
runs. After it runs, it got cleaned up and the file is empty.
I saw in the changelog of dh-python that cleaning this file up is a recent
change [1], which explains why dh-python in stable behaves differently.
There it simply doesn't clean up requires.txt.

[1]: https://tracker.debian.org/media/packages/d/dh-python/changelog-2.20151103
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/reproducible-builds/attachments/20160419/067dc570/attachment-0001.sig>

More information about the Reproducible-builds mailing list