Skip to content

Commit e760255

Browse files
committed
Fix __path__ for pypy3.9
Signed-off-by: Michał Górny <mgorny@gentoo.org>
1 parent e4db3d5 commit e760255

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/python-exec.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ while data is None:
9090
raise
9191

9292
sys.argv[0] = target
93-
# in python3.9+, __file__ paths are absolute
94-
if sys.version_info >= (3, 9):
93+
# in python3.9+, __file__ paths are absolute (but not pypy3.9)
94+
if sys.version_info >= (3, 9) and sys.implementation.name != "pypy":
9595
target = os.path.abspath(target)
9696
new_globals['__file__'] = target
9797

0 commit comments

Comments
 (0)