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
4a0071c339 tried to address as it takes us
out of the equation entirely.
This commit is contained in:
Panu Matilainen 2022-06-14 12:22:21 +03:00
parent 5bac2b2ce3
commit fdcd486b43
2 changed files with 2 additions and 2 deletions

View File

@ -175,6 +175,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)," \

View File

@ -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