aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/archive_util.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2014-05-17 22:58:50 -0400
committerJason R. Coombs <jaraco@jaraco.com>2014-05-17 22:58:50 -0400
commit14f168f249c86085dbf9f67fdc8d6a5b801946a0 (patch)
tree4dfbf8359d74eafe92bdae86d3f56a88c6dac28e /setuptools/archive_util.py
parentf49559970b7e551f045b59c9530733b1bd1ed0e6 (diff)
downloadexternal_python_setuptools-14f168f249c86085dbf9f67fdc8d6a5b801946a0.tar.gz
external_python_setuptools-14f168f249c86085dbf9f67fdc8d6a5b801946a0.tar.bz2
external_python_setuptools-14f168f249c86085dbf9f67fdc8d6a5b801946a0.zip
Clean up whitespace
Diffstat (limited to 'setuptools/archive_util.py')
-rwxr-xr-xsetuptools/archive_util.py54
1 files changed, 7 insertions, 47 deletions
diff --git a/setuptools/archive_util.py b/setuptools/archive_util.py
index 1109f346..a5be2f98 100755
--- a/setuptools/archive_util.py
+++ b/setuptools/archive_util.py
@@ -6,7 +6,11 @@ __all__ = [
"UnrecognizedFormat", "extraction_drivers", "unpack_directory",
]
-import zipfile, tarfile, os, shutil, posixpath
+import zipfile
+import tarfile
+import os
+import shutil
+import posixpath
from pkg_resources import ensure_directory
from distutils.errors import DistutilsError
@@ -14,34 +18,12 @@ class UnrecognizedFormat(DistutilsError):
"""Couldn't recognize the archive type"""
def default_filter(src,dst):
- """The default progress/filter callback; returns True for all files"""
+ """The default progress/filter callback; returns True for all files"""
return dst
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
def unpack_archive(filename, extract_dir, progress_filter=default_filter,
- drivers=None
-):
+ drivers=None):
"""Unpack `filename` to `extract_dir`, or raise ``UnrecognizedFormat``
`progress_filter` is a function taking two arguments: a source path
@@ -75,11 +57,6 @@ def unpack_archive(filename, extract_dir, progress_filter=default_filter,
)
-
-
-
-
-
def unpack_directory(filename, extract_dir, progress_filter=default_filter):
""""Unpack" a directory, using the same interface as for archives
@@ -94,7 +71,6 @@ def unpack_directory(filename, extract_dir, progress_filter=default_filter):
for d in dirs:
paths[os.path.join(base,d)] = src+d+'/', os.path.join(dst,d)
for f in files:
- name = src+f
target = os.path.join(dst,f)
target = progress_filter(src+f, target)
if not target:
@@ -105,22 +81,6 @@ def unpack_directory(filename, extract_dir, progress_filter=default_filter):
shutil.copystat(f, target)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
def unpack_zipfile(filename, extract_dir, progress_filter=default_filter):
"""Unpack zip `filename` to `extract_dir`