diff options
| author | PJ Eby <distutils-sig@python.org> | 2010-10-02 19:16:45 +0000 |
|---|---|---|
| committer | PJ Eby <distutils-sig@python.org> | 2010-10-02 19:16:45 +0000 |
| commit | 7cfca7995a9e5de15663ea4f6e754aa001e6ea98 (patch) | |
| tree | 8612936e087531e6e22104913f9aee9f1efc71bd | |
| parent | 97128303bf077da33cc5b30ce71d853fb730b589 (diff) | |
| download | python-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
| -rwxr-xr-x | EasyInstall.txt | 5 | ||||
| -rwxr-xr-x | setuptools/archive_util.py | 18 | ||||
| -rwxr-xr-x | setuptools/command/easy_install.py | 2 |
3 files changed, 15 insertions, 10 deletions
diff --git a/EasyInstall.txt b/EasyInstall.txt index 45bdf0c8..96ccc55f 100755 --- a/EasyInstall.txt +++ b/EasyInstall.txt @@ -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) 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) |
