[Python-checkins] r85190 - in sandbox/branches/setuptools-0.6: EasyInstall.txt setuptools/archive_util.py setuptools/command/easy_install.py

phillip.eby python-checkins at python.org
Sat Oct 2 21:16:45 CEST 2010


Author: phillip.eby
Date: Sat Oct  2 21:16:45 2010
New Revision: 85190

Log:
Tarfile link support, and handle .pyd/.dll files installed as data on
win32.


Modified:
   sandbox/branches/setuptools-0.6/EasyInstall.txt
   sandbox/branches/setuptools-0.6/setuptools/archive_util.py
   sandbox/branches/setuptools-0.6/setuptools/command/easy_install.py

Modified: sandbox/branches/setuptools-0.6/EasyInstall.txt
==============================================================================
--- sandbox/branches/setuptools-0.6/EasyInstall.txt	(original)
+++ sandbox/branches/setuptools-0.6/EasyInstall.txt	Sat Oct  2 21:16:45 2010
@@ -1226,6 +1226,11 @@
 
  * Fix for recent Sourceforge downloading changes
 
+ * Handle .exe's containing .pyd or .dll files installed as "data" on win32
+
+ * Extract copies of hardlinked and symlinked files in tarballs when extracting
+   source
+
 0.6c11
  * Fix installed script .exe files not working with 64-bit Python on Windows
    (wasn't actually released in 0.6c10 due to a lost checkin)

Modified: sandbox/branches/setuptools-0.6/setuptools/archive_util.py
==============================================================================
--- sandbox/branches/setuptools-0.6/setuptools/archive_util.py	(original)
+++ sandbox/branches/setuptools-0.6/setuptools/archive_util.py	Sat Oct  2 21:16:45 2010
@@ -180,11 +180,15 @@
     try:
         tarobj.chown = lambda *args: None   # don't do any chowning!
         for member in tarobj:
-            if member.isfile() or member.isdir():
-                name = member.name
-                # don't extract absolute paths or ones with .. in them
-                if not name.startswith('/') and '..' not in name:
-                    dst = os.path.join(extract_dir, *name.split('/'))                
+            name = member.name
+            # don't extract absolute paths or ones with .. in them
+            if not name.startswith('/') and '..' not in name:
+                dst = os.path.join(extract_dir, *name.split('/'))
+
+                while member.islnk() or member.issym():
+                    member = tarobj._getmember(member.linkname, member)
+    
+                if member.isfile() or member.isdir():
                     dst = progress_filter(name, dst)
                     if dst:
                         if dst.endswith(os.sep):
@@ -198,8 +202,4 @@
         tarobj.close()
 
 
-
-
 extraction_drivers = unpack_directory, unpack_zipfile, unpack_tarfile
-
-

Modified: sandbox/branches/setuptools-0.6/setuptools/command/easy_install.py
==============================================================================
--- sandbox/branches/setuptools-0.6/setuptools/command/easy_install.py	(original)
+++ sandbox/branches/setuptools-0.6/setuptools/command/easy_install.py	Sat Oct  2 21:16:45 2010
@@ -1274,7 +1274,7 @@
 
     prefixes = [
         ('PURELIB/', ''), ('PLATLIB/pywin32_system32', ''),
-        ('PLATLIB/', ''),
+        ('PLATLIB/', ''), ('DATA/lib/site-packages/', ''),
         ('SCRIPTS/', 'EGG-INFO/scripts/')
     ]
     z = zipfile.ZipFile(exe_filename)


More information about the Python-checkins mailing list