Skip to content

Commit 73a154a

Browse files
earhartmattmoor
authored andcommitted
Use literal '/'s to build internal zip file paths (bazel-contrib#51)
* Use posixpath to build internal zip file paths * Use literal / instead of posixpath * Update piptool.par and whltool.par
1 parent f2e01f9 commit 73a154a

File tree

3 files changed

+2
-2
lines changed

3 files changed

+2
-2
lines changed

rules_python/whl.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,12 @@ def metadata(self):
6060
with zipfile.ZipFile(self.path(), 'r') as whl:
6161
# first check for metadata.json
6262
try:
63-
with whl.open(os.path.join(self._dist_info(), 'metadata.json')) as f:
63+
with whl.open(self._dist_info() + '/metadata.json') as f:
6464
return json.loads(f.read().decode("utf-8"))
6565
except KeyError:
6666
pass
6767
# fall back to METADATA file (https://www.python.org/dev/peps/pep-0427/)
68-
with whl.open(os.path.join(self._dist_info(), 'METADATA')) as f:
68+
with whl.open(self._dist_info() + '/METADATA') as f:
6969
return self._parse_metadata(f.read().decode("utf-8"))
7070

7171
def name(self):

tools/piptool.par

-65 Bytes
Binary file not shown.

tools/whltool.par

-64 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)