Attached is a patch that fixes the setuptools egg_info command to ignore
Debian-specific artifacts.  These have to be ignored when creating the
SOURCES.txt manifest, otherwise dh_python3 will not collapse otherwise
equivalent package egg-info directories.  See also the original bug for
details.
diff --git a/debian/changelog b/debian/changelog
index 69254cc..2fead7f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+python-setuptools (18.4-2) UNRELEASED; urgency=medium
+
+  * When calculating the list of files for SOURCES.txt, always prune paths
+    that contain .pbuild/ and debian/ as these are Debian artifacts.
+    Closes: #802792.
+
+ -- Barry Warsaw <[email protected]>  Fri, 23 Oct 2015 10:45:35 -0400
+
 python-setuptools (18.4-1) unstable; urgency=medium
 
   * New upstream version.
diff --git a/debian/patches/ignore-debian-artifacts.diff b/debian/patches/ignore-debian-artifacts.diff
new file mode 100644
index 0000000..df5e968
--- /dev/null
+++ b/debian/patches/ignore-debian-artifacts.diff
@@ -0,0 +1,19 @@
+Description: Ignore Debian artifacts when creating the SOURCES.txt manifest.
+ Without this dh_python3 will not collapse otherwise identical package
+ egg-info directories.
+Author: Barry Warsaw <[email protected]>
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=802792
+Forwarded: not-needed
+
+--- a/setuptools/command/egg_info.py
++++ b/setuptools/command/egg_info.py
+@@ -361,6 +361,9 @@
+         sep = re.escape(os.sep)
+         self.filelist.exclude_pattern(r'(^|' + sep + r')(RCS|CVS|\.svn)' + sep,
+                                       is_regex=1)
++        # Ignore some Debian-specific patterns.
++        self.filelist.exclude_pattern(r'^debian/', is_regex=1)
++        self.filelist.exclude_pattern(r'.pybuild/', is_regex=1)
+ 
+ 
+ def write_file(filename, contents):
diff --git a/debian/patches/series b/debian/patches/series
index 33b0841..0ef49b8 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
+ignore-debian-artifacts.diff
 install-layout.diff
 multiarch-extname.diff
 fix-python3.5.diff

Attachment: pgppqHMdNkDSc.pgp
Description: OpenPGP digital signature



Reply via email to