File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 1010from installer import install
1111from installer .destinations import SchemeDictionaryDestination
1212from installer .sources import WheelFile
13-
1413from pycross .private .tools import namespace_pkgs
1514from pycross .private .tools .args import FlagFileArgumentParser
1615
1716
17+ def remove_pycache_folders (root_dir ):
18+ """
19+ Recursively delete __pycache__ directories in the specified directory.
20+ """
21+ root_path = Path (root_dir )
22+ for pycache_dir in root_path .rglob ("__pycache__" ):
23+ shutil .rmtree (pycache_dir , ignore_errors = True )
24+
25+
1826def setup_namespace_pkg_compatibility (wheel_dir : Path ) -> None :
1927 """Converts native namespace packages to pkgutil-style packages
2028
@@ -77,6 +85,7 @@ def main(args: Any) -> None:
7785 )
7886 finally :
7987 shutil .rmtree (link_dir , ignore_errors = True )
88+ remove_pycache_folders (lib_dir )
8089
8190 setup_namespace_pkg_compatibility (lib_dir )
8291
You can’t perform that action at this time.
0 commit comments