summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Festi <ffesti@redhat.com>2020-03-09 23:44:14 +0100
committerPanu Matilainen <pmatilai@redhat.com>2020-03-26 11:57:58 +0200
commitace86dc61aa5bb29bbb09551b6876c94fc50a782 (patch)
tree82f8e5b1edc3c349aab443a0f5db51eaa92d8f09
parent60f71902067c018887a1ec3616e1e33fabac4fac (diff)
downloadrpm-ace86dc61aa5bb29bbb09551b6876c94fc50a782.tar.gz
Use python2 as the python binary name
Modern distributions have switch /usr/bin/python to be Python 3 This rpm version still needs to use Python 2 especially for the test suite.
-rw-r--r--configure.ac3
-rw-r--r--tests/atlocal.in2
-rw-r--r--tests/local.at2
3 files changed, 4 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index 14fb33277..1e891c8fd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -129,7 +129,8 @@ AC_MSG_CHECKING(old version of patch)
AC_PATH_PROG(__PERL, perl, /usr/bin/perl, $MYPATH)
AC_PATH_PROG(__PGP, pgp, /usr/bin/pgp, $MYPATH)
-AC_PATH_PROG(__PYTHON, python, /usr/bin/python, $MYPATH)
+AC_PATH_PROG(__PYTHON, python2, /usr/bin/python2, $MYPATH)
+AC_PATH_PROG(PYTHON, python2, /usr/bin/python2, $MYPATH)
AC_PATH_PROG(__RM, rm, /bin/rm, $MYPATH)
AC_PATH_PROG(__RSH, rsh, /usr/bin/rsh, $MYPATH)
AC_PATH_PROG(__SED, sed, /bin/sed, $MYPATH)
diff --git a/tests/atlocal.in b/tests/atlocal.in
index d7d837f45..f4a8308ac 100644
--- a/tests/atlocal.in
+++ b/tests/atlocal.in
@@ -3,7 +3,7 @@ export LD_LIBRARY_PATH
PATH="${abs_builddir}/testing@rpmbindir@:${abs_builddir}/testing@usrbindir@:$PATH"
export PATH
-PYLIBDIR=`python -c "from distutils.sysconfig import get_python_lib; import sys; sys.stdout.write(get_python_lib(1,0,'@execprefix@'))"`
+PYLIBDIR=`python2 -c "from distutils.sysconfig import get_python_lib; import sys; sys.stdout.write(get_python_lib(1,0,'@execprefix@'))"`
PYTHONPATH="${abs_builddir}/testing${PYLIBDIR}"
export PYTHONPATH
diff --git a/tests/local.at b/tests/local.at
index 48c5d3f96..c8b0b1944 100644
--- a/tests/local.at
+++ b/tests/local.at
@@ -17,7 +17,7 @@ def myprint(msg = ''):
sys.stdout.write('%s\n' % msg)
$1
EOF
-python test.py
+python2 test.py
]])
m4_define([RPMPY_CHECK],[