[Python-Dev] addressing distutils inability to track file dependencies

Andrew Kuchling akuchlin@mems-exchange.org
Fri, 14 Jun 2002 08:24:36 -0400

On Fri, Jun 14, 2002 at 11:10:46AM +0100, Michael Hudson wrote:
>Yeah, this area sucks.  It interacts v. badly with umask, too.  Maybe
>I'll work on this bug instead on my next train journey... installing
>shared libraries with something like copy_tree is gross.

Out of curiosity, why?  

I've had the patch below sitting in my copy of the tree forever, but
haven't gotten around to checking whether it fixes the umask-related
bug: I think it should, though.

Index: install_lib.py
RCS file: /cvsroot/python/python/dist/src/Lib/distutils/command/install_lib.py,vretrieving revision 1.40
diff -u -r1.40 install_lib.py
--- install_lib.py      4 Jun 2002 20:14:43 -0000       1.40
+++ install_lib.py      14 Jun 2002 12:05:30 -0000
@@ -106,7 +106,8 @@

     def install (self):
         if os.path.isdir(self.build_dir):
-            outfiles = self.copy_tree(self.build_dir, self.install_dir)
+            outfiles = self.copy_tree(self.build_dir, self.install_dir,
+                                      preserve_mode=1)
             self.warn("'%s' does not exist -- no Python modules to install" %