File
8000
tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -15,13 +15,9 @@ def spread_purelib_into_root(wheel_dir: str) -> None:
15
15
wheel_metadata_file_path = pathlib .Path (dist_info , "WHEEL" )
16
16
wheel_metadata_dict = wheel .parse_wheel_meta_file (str (wheel_metadata_file_path ))
17
17
18
- if "Root-Is-Purelib" not in wheel_metadata_dict :
19
- raise ValueError (
20
- "Invalid WHEEL file '%s'. Expected key 'Root-Is-Purelib'."
21
- % wheel_metadata_file_path
22
- )
23
- root_is_purelib = wheel_metadata_dict ["Root-Is-Purelib" ]
24
-
18
+ # It is not guaranteed that a WHEEL file author populates 'Root-Is-Purelib'.
19
+ # See: https://github.com/bazelbuild/rules_python/issues/435
20
+ root_is_purelib : str = wheel_metadata_dict .get ("Root-Is-Purelib" , "" )
25
21
if root_is_purelib .lower () == "true" :
26
22
# The Python package code is in the root of the Wheel, so no need to 'spread' anything.
27
23
return
You can’t perform that action at this time.
0 commit comments