Skip to content

Commit 7572f1f

Browse files
committed
_frozen_importlib: fix lib_python path discovery
1 parent b00a2d3 commit 7572f1f

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

graalpython/lib-graalpython/_frozen_importlib.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@
4242
lib_python = None
4343
for p in sys.path:
4444
if "lib-python/3" in p:
45-
lib_python = p
45+
path, delim, _ = p.partition('lib-python/3')
46+
lib_python = path + delim
4647
break
4748

48-
4949
if lib_python is None:
5050
raise RuntimeError("Cannot load frozen_importlib")
5151

graalpython/lib-graalpython/_frozen_importlib_external.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@
4242
lib_python = None
4343
for p in sys.path:
4444
if "lib-python/3" in p:
45-
lib_python = p
45+
path, delim, _ = p.partition('lib-python/3')
46+
lib_python = path + delim
4647
break
4748

4849

0 commit comments

Comments
 (0)