Package: dh-python
Version: 2.20150826
Seen while debugging #802882. Take the zope.testing package 4.5.0-1, or 4.5.0-2
(and remove the dh_install override). Build the package normally, and you'll
see the artifacts, which are worked around in 4.5.0-2. Build the package with
nocheck, and the package looks fine.
the problem is that the egg_info gets installed twice, and you end up with
(after the dh_auto_install step):
debian/python3-zope.testing/usr/lib/python3.5/dist-packages/zope.testing-4.5.0.egg-info
debian/python3-zope.testing/usr/lib/python3.5/dist-packages/zope.testing-4.5.0.egg-info/top_level.txt
debian/python3-zope.testing/usr/lib/python3.5/dist-packages/zope.testing-4.5.0.egg-info/not-zip-safe
debian/python3-zope.testing/usr/lib/python3.5/dist-packages/zope.testing-4.5.0.egg-info/requires.txt
debian/python3-zope.testing/usr/lib/python3.5/dist-packages/zope.testing-4.5.0.egg-info/namespace_packages.txt
debian/python3-zope.testing/usr/lib/python3.5/dist-packages/zope.testing-4.5.0.egg-info/PKG-INFO
debian/python3-zope.testing/usr/lib/python3.5/dist-packages/zope.testing-4.5.0.egg-info/dependency_links.txt
debian/python3-zope.testing/usr/lib/python3.5/dist-packages/zope.testing.egg-info
debian/python3-zope.testing/usr/lib/python3.5/dist-packages/zope.testing.egg-info/top_level.txt
debian/python3-zope.testing/usr/lib/python3.5/dist-packages/zope.testing.egg-info/SOURCES.txt
debian/python3-zope.testing/usr/lib/python3.5/dist-packages/zope.testing.egg-info/not-zip-safe
debian/python3-zope.testing/usr/lib/python3.5/dist-packages/zope.testing.egg-info/requires.txt
debian/python3-zope.testing/usr/lib/python3.5/dist-packages/zope.testing.egg-info/namespace_packages.txt
debian/python3-zope.testing/usr/lib/python3.5/dist-packages/zope.testing.egg-info/PKG-INFO
debian/python3-zope.testing/usr/lib/python3.5/dist-packages/zope.testing.egg-info/dependency_links.txt
The versioned install doesn't install the SOURCES.txt, but the unversioned
install is.
looking at the build log, you see that the unversioned egg-info is installed by
"install_lib", the versioned by "install_egg_info".
I think, the former is wrong, this appears to be an upstream setuptools change.
Now, the interesting thing is, when you run the package build with nocheck, the
unversioned egg-info isn't installed at all.
with nocheck:
$ ls .pybuild/pythonX.Y_3.4/build/
zope
with check:
$ ls .pybuild/pythonX.Y_3.4/build/
zope zope.testing.egg-info
then for some unknwon reason the unversioned egg is installed as part of
install_lib, which it shouldn't.
When I rewrite zope.testing not to use pybuild, everything is fine.
So the question is, why does setuptools behave differently when building (?) and
running the tests from a separate directory. I haven't yet looked at this, but
it looks like this can be avoided by removing the extra egg in the builddir
after running the tests.