Set a deterministic path for installed Kea python files (and fix --with-site-packages as it turned out that it had no effect previously)
All the installed files have had fixed paths relative to the prefix up until recently. We know this because we explicitly check for it in Jenkins.
The location where python files are installed started varying between installations, on the same system. Sometimes they are installed in ${prefix}/lib
, other times in ${prefix}/local/lib
.
When not specified via --with-site-packages
, we can have the path be set to something deterministic in configure.ac
, something like:
if test -z "${pythondir}"; then
pythondir="${prefix}/lib/${python_version}/site-packages"
pkgpythondir="${pythondir}/${PACKAGE_NAME}"
fi
Worth noting that the following hardcoded list of versions is outdated. This may have something to do with it, because the problem started happening on Fedora 36 which has python 3.10 which is missing from the list.
m4_define_default([_AM_PYTHON_INTERPRETER_LIST],
[python3 python3.9 python3.8 python3.7 python3.6 python3.5 python3.4 dnl
python3.3 python3.2 python3.1 python3.0 python python2 python2.7])