summaryrefslogtreecommitdiff
path: root/setuptools
diff options
context:
space:
mode:
authorPJ Eby <distutils-sig@python.org>2010-10-02 19:16:45 +0000
committerPJ Eby <distutils-sig@python.org>2010-10-02 19:16:45 +0000
commit7cfca7995a9e5de15663ea4f6e754aa001e6ea98 (patch)
tree8612936e087531e6e22104913f9aee9f1efc71bd /setuptools
parent97128303bf077da33cc5b30ce71d853fb730b589 (diff)
downloadpython-setuptools-git-7cfca7995a9e5de15663ea4f6e754aa001e6ea98.tar.gz
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
Diffstat (limited to 'setuptools')
-rwxr-xr-xsetuptools/archive_util.py18
-rwxr-xr-xsetuptools/command/easy_install.py2
2 files changed, 10 insertions, 10 deletions
diff --git a/setuptools/archive_util.py b/setuptools/archive_util.py
index 5d72e7ed..be813746 100755
--- a/setuptools/archive_util.py
+++ b/setuptools/archive_util.py
@@ -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
-
-
diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py
index 014fc70d..90f29320 100755
--- a/setuptools/command/easy_install.py
+++ b/setuptools/command/easy_install.py
@@ -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)