[Python-checkins] r53673 - sandbox/trunk/setuptools/pkg_resources.py

phillip.eby python-checkins at python.org
Thu Feb 8 21:08:16 CET 2007


Author: phillip.eby
Date: Thu Feb  8 21:08:16 2007
New Revision: 53673

Modified:
   sandbox/trunk/setuptools/pkg_resources.py
Log:
Ensure extracted libraries have correct permissions on Posix systems
(e.g. Cygwin, which is where I found the problem.) 


Modified: sandbox/trunk/setuptools/pkg_resources.py
==============================================================================
--- sandbox/trunk/setuptools/pkg_resources.py	(original)
+++ sandbox/trunk/setuptools/pkg_resources.py	Thu Feb  8 21:08:16 2007
@@ -883,6 +883,23 @@
         return target_path
 
 
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
     def postprocess(self, tempname, filename):
         """Perform any platform-specific postprocessing of `tempname`
 
@@ -897,7 +914,31 @@
         is the name it will be renamed to by the caller after this routine
         returns.
         """
-        # XXX
+
+        if os.name == 'posix':
+            # Make the resource executable
+            mode = ((os.stat(tempname).st_mode) | 0555) & 07777
+            os.chmod(tempname, mode)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
 
 
     def set_extraction_path(self, path):


More information about the Python-checkins mailing list