From ace86dc61aa5bb29bbb09551b6876c94fc50a782 Mon Sep 17 00:00:00 2001 From: Florian Festi Date: Mon, 9 Mar 2020 23:44:14 +0100 Subject: 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. --- configure.ac | 3 ++- tests/atlocal.in | 2 +- tests/local.at | 2 +- 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],[ -- cgit v1.2.1