Fix #1319 - Allow use of Zip64 extension

This commit is contained in:
Donald Stufft 2014-06-13 07:15:03 -04:00
parent a88deeba52
commit 169379d839
3 changed files with 8 additions and 2 deletions

View File

@ -48,6 +48,9 @@
* Fixed :issue:`1680`. Attempt to locate system TLS certificates to use instead
of the included CA Bundle if possible. (:pull:`1866`)
* Fixed :issue:`1319`. Allow use of Zip64 extension in Wheels and other zip
files. (:pull:`1868`)
**1.5.7**

View File

@ -680,7 +680,10 @@ exec(compile(
)
shutil.move(archive_path, dest_file)
if create_archive:
zip = zipfile.ZipFile(archive_path, 'w', zipfile.ZIP_DEFLATED)
zip = zipfile.ZipFile(
archive_path, 'w', zipfile.ZIP_DEFLATED,
allowZip64=True
)
dir = os.path.normcase(os.path.abspath(self.source_dir))
for dirpath, dirnames, filenames in os.walk(dir):
if 'pip-egg-info' in dirnames:

View File

@ -501,7 +501,7 @@ def unzip_file(filename, location, flatten=True):
os.makedirs(location)
zipfp = open(filename, 'rb')
try:
zip = zipfile.ZipFile(zipfp)
zip = zipfile.ZipFile(zipfp, allowZip64=True)
leading = has_leading_dir(zip.namelist()) and flatten
for info in zip.infolist():
name = info.filename