We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a8c48d0 commit 7c34451Copy full SHA for 7c34451
src/python-exec.in
@@ -1,6 +1,6 @@
1
#!@bindir@/python-exec2c@exeext@
2
# vim:fileencoding=utf-8:ft=python
3
-# (c) 2012-2016 Michał Górny
+# (c) 2012-2021 Michał Górny
4
# Released under the terms of the 2-clause BSD license.
5
#
6
# This is not the script you are looking for. This is just a wrapper.
@@ -81,6 +81,9 @@ while data is None:
81
raise
82
83
sys.argv[0] = target
84
+# in python3.9+, __file__ paths are absolute
85
+if sys.version_info >= (3, 9):
86
+ target = os.path.abspath(target)
87
new_globals['__file__'] = target
88
89
exec(data, new_globals)
0 commit comments