]> git.ipfire.org Git - thirdparty/automake.git/commit
python: use Python's sys.prefix and sys.exec_prefix
authorJoshua Root <jmr@macports.org>
Tue, 18 May 2021 22:11:59 +0000 (15:11 -0700)
committerKarl Berry <karl@freefriends.org>
Tue, 18 May 2021 22:11:59 +0000 (15:11 -0700)
commited8daa069a6c8ed34f7856c42402ec46f305e670
tree82d3f572534f3a45bbadd355baf8b2d3b8be96de
parent0c8100cb654397d6de62df383f507b3cdecf0cd0
python: use Python's sys.prefix and sys.exec_prefix

for PYTHON_PREFIX and PYTHON_EXEC_PREFIX; new configure options
--with-python_prefix and --with-python_exec_prefix to set explicitly.

This change fixes https://bugs.gnu.org/35322.

* m4/python.m4 (AM_PATH_PYTHON): use Python's sys.prefix and
sys.exec_prefix for PYTHON_PREFIX and PYTHON_EXEC_PREFIX,
instead of $prefix and $exec_prefix. But use a variable
reference to ${prefix} if it is contained within sys.prefix;
similarly for exec_prefix. Also support new configure options
to set explicitly.
(PYTHON_PREFIX, PYTHON_EXEC_PREFIX): AC_SUBST these.
(am_cv_python_pythondir): use our new $am_cv_python_prefix,
substituting ${PYTHON_PREFIX}.
(am_cv_python_pyexecdir): likewise.
* doc/automake.texi (Python): PYTHON_PREFIX, PYTHON_EXEC_PREFIX,
document new approach.
* t/instmany-python.sh: set PYTHON_PREFIX as needed.
* t/python-vars.sh (PYTHON_EXEC_PREFIX, PYTHON_PREFIX): also set from
Python's sys.{exec_,}prefix; use ${PYTHON_{EXEC,}PREFIX} instead
of ${exec_,}prefix.
doc/automake.texi
m4/python.m4
t/instmany-python.sh
t/python-vars.sh