summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2022-06-14 12:22:21 +0300
committerPanu Matilainen <pmatilai@redhat.com>2022-06-28 14:51:02 +0300
commit8e8b15d439415df0567dd1bfc03d4d4a29eaa385 (patch)
tree0645f5ec06b1c4a68204745adaacda9c5dd04e69
parent5399b8586d54beec9f707f8e61b7fdceadf4c411 (diff)
downloadrpm-8e8b15d439415df0567dd1bfc03d4d4a29eaa385.tar.gz
Use python path from the build system instead of trying to reproduce it
Fedora >= 36 carries a downstream patch which causes distutils.sysconfig and sysconfig to disagree on the prefix, and with autoconf up to 2.69 using distutils, 2.70 preferring sysconfig and other tools still using distutils it gets a bit much to guess. So don't. It's a much nicer solution to the mess that commit 4a0071c339083866dd8901e3ef449908488a9420 tried to address as it takes us out of the equation entirely. (cherry picked from commit fdcd486b43652bb32dd40ef84f40b11dc6d9dda5)
-rw-r--r--tests/Makefile.am1
-rw-r--r--tests/atlocal.in3
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 291452a75..7e7806da6 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -170,6 +170,7 @@ atlocal: atlocal.in Makefile
-e "s,[@]usrbindir[@],$(bindir)," \
-e "s,[@]usrlibdir[@],$(libdir)," \
-e "s,[@]execprefix[@],$(exec_prefix)," \
+ -e "s,[@]pyexecdir[@],$(pyexecdir)," \
-e "s,[@]usrlibexecdir[@],$(rpmlibexecdir),g" \
-e "s,[@]RPMCONFIGDIR[@],$(rpmconfigdir)," \
-e "s,[@]PYTHON[@],$(PYTHON)," \
diff --git a/tests/atlocal.in b/tests/atlocal.in
index dae3f0a29..9d1b5f6bb 100644
--- a/tests/atlocal.in
+++ b/tests/atlocal.in
@@ -7,8 +7,7 @@ export PATH
PYTHON=@PYTHON@
if test "${PYTHON}"; then
- PYLIBDIR=$(${PYTHON} -c "import sysconfig, sys; sys.stdout.write(sysconfig.get_path('platlib', vars={'platbase':'@execprefix@'}))")
- PYTHONPATH="${abs_builddir}/testing${PYLIBDIR}"
+ PYTHONPATH="${abs_builddir}/testing@pyexecdir@"
export PYTHONPATH
fi