summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--wheel/metadata.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/wheel/metadata.py b/wheel/metadata.py
index b3cc65c..d037c3a 100644
--- a/wheel/metadata.py
+++ b/wheel/metadata.py
@@ -244,7 +244,8 @@ def pkginfo_to_metadata(egg_info_path, pkginfo_path):
pkg_info.replace_header('Metadata-Version', '2.0')
requires_path = os.path.join(egg_info_path, 'requires.txt')
if os.path.exists(requires_path):
- requires = open(requires_path).read()
+ with open(requires_path) as requires_file:
+ requires = requires_file.read()
for extra, reqs in sorted(pkg_resources.split_sections(requires),
key=lambda x: x[0] or ''):
condition = ''