From e5b267ccb63d2f0a0f622693f425d5c9186e2424 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 27 May 2000 03:03:23 +0000 Subject: 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."). --- Lib/distutils/command/sdist.py | 7 +++++++ 1 file changed, 7 insertions(+) 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 () -- cgit v0.12