summaryrefslogtreecommitdiff
path: root/wheel/install.py
diff options
context:
space:
mode:
Diffstat (limited to 'wheel/install.py')
-rw-r--r--wheel/install.py21
1 files changed, 11 insertions, 10 deletions
diff --git a/wheel/install.py b/wheel/install.py
index 3af6d0c..a422b0e 100644
--- a/wheel/install.py
+++ b/wheel/install.py
@@ -18,12 +18,12 @@ try:
except NameError:
_big_number = sys.maxint
-from wheel.decorator import reify
-from wheel.util import (urlsafe_b64encode, from_json, urlsafe_b64decode,
- native, binary, HashingFile)
-from wheel import signatures
-from wheel.pkginfo import read_pkg_info_bytes
-from wheel.util import open_for_csv
+from .decorator import reify
+from .util import (urlsafe_b64encode, from_json, urlsafe_b64decode,
+ native, binary, HashingFile)
+from . import signatures
+from .pkginfo import read_pkg_info_bytes
+from .util import open_for_csv
from .pep425tags import get_supported
from .paths import get_install_paths
@@ -360,10 +360,11 @@ class WheelFile(object):
os.chmod(dest, info.external_attr >> 16)
record_name = os.path.join(root, self.record_name)
- writer = csv.writer(open_for_csv(record_name, 'w+'))
- for reldest, digest, length in sorted(record_data):
- writer.writerow((reldest, digest, length))
- writer.writerow((self.record_name, '', ''))
+ with open_for_csv(record_name, 'w+') as record_file:
+ writer = csv.writer(record_file)
+ for reldest, digest, length in sorted(record_data):
+ writer.writerow((reldest, digest, length))
+ writer.writerow((self.record_name, '', ''))
def verify(self, zipfile=None):
"""Configure the VerifyingZipFile `zipfile` by verifying its signature