alexk / rpms / rpm

Forked from rpms/rpm 2 years ago
Clone
ed184b
From 6b6c4d881dc6fc99f949dac4aaf9a513542f9956 Mon Sep 17 00:00:00 2001
ed184b
Message-Id: <6b6c4d881dc6fc99f949dac4aaf9a513542f9956.1571920849.git.pmatilai@redhat.com>
ed184b
From: Panu Matilainen <pmatilai@redhat.com>
ed184b
Date: Wed, 3 Oct 2018 15:22:55 +0300
ed184b
Subject: [PATCH 1/5] Honor PYTHON from configure when running tests
ed184b
ed184b
Pass PYTHON from configure down through all the nutty layers of make
ed184b
to allow running test-suite with Python 3. In theory that is.
ed184b
ed184b
(cherry picked from commit dcd5ab67c40b543f22b07df8c1028c34b94a7929)
ed184b
---
ed184b
 tests/Makefile.am | 1 +
ed184b
 tests/atlocal.in  | 3 ++-
ed184b
 tests/local.at    | 2 +-
ed184b
 3 files changed, 4 insertions(+), 2 deletions(-)
ed184b
ed184b
diff --git a/tests/Makefile.am b/tests/Makefile.am
ed184b
index eaf817cc2..21ca216a8 100644
ed184b
--- a/tests/Makefile.am
ed184b
+++ b/tests/Makefile.am
ed184b
@@ -117,6 +117,7 @@ atlocal:	atlocal.in Makefile
ed184b
 	  -e "s,[@]usrlibdir[@],$(libdir)," \
ed184b
 	  -e "s,[@]execprefix[@],$(exec_prefix)," \
ed184b
 	  -e "s,[@]RPMCONFIGDIR[@],$(rpmconfigdir)," \
ed184b
+	  -e "s,[@]PYTHON[@],$(PYTHON)," \
ed184b
 	< $(srcdir)/atlocal.in > atlocal
ed184b
 DISTCLEANFILES = atlocal
ed184b
 EXTRA_DIST += atlocal.in
ed184b
diff --git a/tests/atlocal.in b/tests/atlocal.in
ed184b
index d7d837f45..3b1474b56 100644
467d1d
--- rpm-4.14.3/tests/atlocal.in.orig	2020-04-28 14:19:26.866602968 +0200
467d1d
+++ rpm-4.14.3/tests/atlocal.in	2020-04-28 14:21:07.977910054 +0200
467d1d
@@ -3,7 +3,8 @@
ed184b
 PATH="${abs_builddir}/testing@rpmbindir@:${abs_builddir}/testing@usrbindir@:$PATH"
ed184b
 export PATH
ed184b
 
467d1d
-PYLIBDIR=`python2 -c "from distutils.sysconfig import get_python_lib; import sys; sys.stdout.write(get_python_lib(1,0,'@execprefix@'))"`
ed184b
+PYTHON=@PYTHON@
ed184b
+PYLIBDIR=$(${PYTHON} -c "from distutils.sysconfig import get_python_lib; import sys; sys.stdout.write(get_python_lib(1,0,'@execprefix@'))")
ed184b
 PYTHONPATH="${abs_builddir}/testing${PYLIBDIR}"
ed184b
 export PYTHONPATH
ed184b
 
467d1d
--- rpm-4.14.3/tests/local.at.orig	2020-04-28 14:28:33.106664317 +0200
467d1d
+++ rpm-4.14.3/tests/local.at	2020-04-28 14:29:02.064038653 +0200
467d1d
@@ -18,7 +18,7 @@
ed184b
     sys.stdout.write('%s\n' % msg)
ed184b
 $1
ed184b
 EOF
467d1d
-python2 test.py
467d1d
+${PYTHON} test.py test.py
ed184b
 ]])
ed184b
 
ed184b
 m4_define([RPMPY_CHECK],[