Set a deterministic path for installed Kea python files
Closes #2669 (closed).
Explanation of changes:
- Moved
PYTHON_PREFIX
andPYTHON_EXEC_PREFIX
toconfigure.ac
. They are there for MacOS compatibility. See Kea issue 2012. My reasoning was that as long as we set them, it should affect all python files. We don't have any others than kea-shell at the moment, but it's good to address future issues caused by forgetting to set them when other python scripts are added. It would be great if this could be tested on MacOS. - Reduced the list of python interpreters to the ones containing at most the major version, in order of preference. This is because distributions are starting to get python3.10 and above, and we can't tractably address all of the major+minor combinations. The 2.7+ version constraint is still enforced by
AM_PATH_PYTHON([2.7])
. - Used
with_site_packages
value inAC_ARG_WITH
. The previouspythondir
andpkgpythondir
values that were used, are also set byAM_PATH_PYTHON
. - The distinction above is necessary to add a fix default value for pythondir:
pythondir="${prefix}/lib/python${PYTHON_VERSION}/site-packages"
. This is the originally intended fix. -
--with-site-packages
didn't work before. I think the lack of distinction above had something to do with it. That is - if the flag was mentioned, the python files were not installed at the given location. I kindly ask the reviewer to verify this. The command cycle is short and can be repeated with celerity for testing purposes:git clean -dffx .; autoreconf -fi; ./configure --enable-shell [--with-site-packages=...]; make install -C src/bin/shell
. If the solution gets accepted, I'd like to change the description of the issue to also say that this has fixed--with-site-packages
. - Exanded
pythondir
instead ofPKGPYTHONDIR
so that everything based onpythondir
also ends up expanded. This made more sense during development, but now it's equivalent to the prior behavior. I still prefer it this way and would keep it, but I don't insist.
Edited by Andrei Pavel