Don't look for a Python 2 interpreter

Don't look for a Python 2 interpreter as Python is no longer
supported. If there is a Python 2 available and it had the Mercurial
modules available, hg-fast-export would use it and fail to import
`importlib.machinery`. This is probably the cause of #314.

Closes #314.
This commit is contained in:
Frej Drejhammar
2023-12-27 12:52:26 +01:00
parent c8fa290adf
commit 1bbf7028b4

View File

@@ -29,7 +29,7 @@ GFI_OPTS=""
if [ -z "${PYTHON}" ]; then
# $PYTHON is not set, so we try to find a working python with mercurial:
for python_cmd in python2 python python3; do
for python_cmd in python3 python; do
if command -v $python_cmd > /dev/null; then
$python_cmd -c 'from mercurial.scmutil import revsymbol' 2> /dev/null
if [ $? -eq 0 ]; then