After talking with Donald Stufft, we agreed that ignoring all dot-directories isn't a good approach, and not something upstream would be interested in. I've cloned this bug onto python-setuptools and am preparing a patch that will prune debian/ and .pybuild/ for that package. It's a two-line change and I've verified that it fixes the problem for zope.testing and flufl.enum, and doesn't otherwise break webob (which was not affected).
However, I still think it's useful to add the additional diagnostics to dh_python3 and I've retitled this bug accordingly. This provides valuable feedback when the unexpected happens. I've pushed an update to the git branch previously mentioned, but I'll attach a diff here as well (sans the changelog change).
diff --git a/dhpython/fs.py b/dhpython/fs.py
index e0be654..be804a5 100644
--- a/dhpython/fs.py
+++ b/dhpython/fs.py
@@ -18,9 +18,11 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
+import difflib
import logging
import os
import re
+import sys
from filecmp import cmp as cmpfile
from os.path import exists, dirname, isdir, islink, join, split, splitext
from shutil import rmtree
@@ -99,6 +101,15 @@ def share_files(srcdir, dstdir, interpreter, options):
share_files(fpath1, fpath2, interpreter, options)
elif cmpfile(fpath1, fpath2, shallow=False):
os.remove(fpath1)
+ else:
+ log.warn('Paths differ: %s and %s', fpath1, fpath2)
+ # The files differed so we cannot collapse them.
+ with open(fpath1) as fp1:
+ fromlines = fp1.readlines()
+ with open(fpath2) as fp2:
+ tolines = fp2.readlines()
+ diff = difflib.unified_diff(fromlines, tolines, fpath1, fpath2)
+ sys.stderr.writelines(diff)
# XXX: check symlinks
if exists(srcdir) and not os.listdir(srcdir):
pgpRGUCKmTe7u.pgp
Description: OpenPGP digital signature

