We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d8690f3 commit 92397eeCopy full SHA for 92397ee
src/purelib.py
@@ -1,3 +1,4 @@
1
+import os
2
import pathlib
3
import shutil
4
@@ -18,4 +19,15 @@ def spread_purelib_into_root(extracted_whl_directory: str) -> None:
18
19
return
20
21
dot_data_dir = wheel.get_dot_data_directory(extracted_whl_directory)
- shutil.move(dot_data_dir, extracted_whl_directory)
22
+
23
+ # 'Root-Is-Purelib: false' is no gaurante a .date directory exists with
24
+ # package code in it. eg. the 'markupsafe' package.
25
+ if dot_data_dir:
26
+ for child in pathlib.Path(dot_data_dir).iterdir():
27
+ # TODO(Jonathon): Should all other potential folders get ignored?
28
+ if str(child).endswith("purelib"):
29
+ for grandchild in child.iterdir():
30
+ shutil.move(
31
+ src=str(grandchild),
32
+ dst=extracted_whl_directory,
33
+ )
0 commit comments