diff Lib/distutils/command/build_py.py @ 41929:24efa2e448bc legacy-trunk

SF 1668596/1720897: distutils now copies data files even if package_dir is empty. This needs to be backported. I'm too tired tonight. It would be great if someone backports this if the buildbots are ok with it. Otherwise, I will try to get to it tomorrow.
author Neal Norwitz <nnorwitz@gmail.com>
date Fri, 01 Jun 2007 07:29:12 +0000
parents 893d46576737
children 1d84bf5f9478
line wrap: on
line diff
--- a/Lib/distutils/command/build_py.py	Fri Jun 01 04:56:47 2007 +0000
+++ b/Lib/distutils/command/build_py.py	Fri Jun 01 07:29:12 2007 +0000
@@ -114,7 +114,9 @@
             build_dir = os.path.join(*([self.build_lib] + package.split('.')))
 
             # Length of path to strip from found files
-            plen = len(src_dir)+1
+            plen = 0
+            if src_dir:
+                plen = len(src_dir)+1
 
             # Strip directory from globbed filenames
             filenames = [