summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorGreg Ward <gward@python.net>2000-05-27 03:03:23 (GMT)
committerGreg Ward <gward@python.net>2000-05-27 03:03:23 (GMT)
commite5b267ccb63d2f0a0f622693f425d5c9186e2424 (patch)
tree90f96017aba805411693e4b22b5953c07a775345 /Lib
parent51def7d667a42eac177690e1fe00eab7f2102319 (diff)
downloadcpython-e5b267ccb63d2f0a0f622693f425d5c9186e2424.zip
cpython-e5b267ccb63d2f0a0f622693f425d5c9186e2424.tar.gz
cpython-e5b267ccb63d2f0a0f622693f425d5c9186e2424.tar.bz2
Patch from Andrew Kuchling: prune out the build and source distribution
directories after all is said and done, so we don't accidentally include those files in the source distribution. (This is the quick and easy way to fix this; Andrew says: "Changing findall() looked like it was going to be messy, so I tried this instead. The only problem is that redundant directory traversals are being done, walking through build/ only to throw out all the files found at the end.").
Diffstat (limited to 'Lib')
-rw-r--r--Lib/distutils/command/sdist.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/distutils/command/sdist.py b/Lib/distutils/command/sdist.py
index 56bc4c9..0a57ba3 100644
--- a/Lib/distutils/command/sdist.py
+++ b/Lib/distutils/command/sdist.py
@@ -440,6 +440,13 @@ class sdist (Command):
# while loop over lines of template file
+ # Prune away the build and source distribution directories
+ build = self.find_peer ('build')
+ exclude_pattern (self.files, None, prefix=build.build_base)
+
+ base_dir = self.distribution.get_fullname()
+ exclude_pattern (self.files, None, prefix=base_dir)
+
# read_template ()