diff options
author | Zac Medico <zmedico@gentoo.org> | 2021-03-06 12:20:30 -0800 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2021-03-06 12:20:46 -0800 |
commit | 4f60b68fca342cc92ed7729d241e2c60132876e8 (patch) | |
tree | 0b0c357b6b3654a8945da21c6b87d34a5d4519da | |
parent | Remove unused EventLoop class (diff) | |
download | portage-4f60b68fca342cc92ed7729d241e2c60132876e8.tar.gz portage-4f60b68fca342cc92ed7729d241e2c60132876e8.tar.bz2 portage-4f60b68fca342cc92ed7729d241e2c60132876e8.zip |
bin_entry_point: handle versioned python shebangs
Signed-off-by: Zac Medico <zmedico@gentoo.org>
-rw-r--r-- | lib/portage/util/bin_entry_point.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/portage/util/bin_entry_point.py b/lib/portage/util/bin_entry_point.py index ce95231eb..7d359052e 100644 --- a/lib/portage/util/bin_entry_point.py +++ b/lib/portage/util/bin_entry_point.py @@ -20,7 +20,7 @@ def bin_entry_point(): if os.access(script_path, os.X_OK): with open(script_path, "rt") as f: shebang = f.readline() - python_match = re.search(r"/python\s+([^/]*)\s+$", shebang) + python_match = re.search(r"/python[\d\.]*\s+([^/]*)\s+$", shebang) if python_match: sys.argv = [ os.path.join(os.path.dirname(sys.argv[0]), "python"), |