Commit 7cfca799 authored by PJ Eby's avatar PJ Eby

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

win32.

--HG--
branch : setuptools-0.6
extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/branches/setuptools-0.6%4085190
parent 97128303
......@@ -1226,6 +1226,11 @@ Release Notes/Change History
* 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)
......
......@@ -180,11 +180,15 @@ def unpack_tarfile(filename, extract_dir, progress_filter=default_filter):
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 @@ def unpack_tarfile(filename, extract_dir, progress_filter=default_filter):
tarobj.close()
extraction_drivers = unpack_directory, unpack_zipfile, unpack_tarfile
......@@ -1274,7 +1274,7 @@ def get_exe_prefixes(exe_filename):
prefixes = [
('PURELIB/', ''), ('PLATLIB/pywin32_system32', ''),
('PLATLIB/', ''),
('PLATLIB/', ''), ('DATA/lib/site-packages/', ''),
('SCRIPTS/', 'EGG-INFO/scripts/')
]
z = zipfile.ZipFile(exe_filename)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment