From: Michael Jeanson Date: Thu, 10 Sep 2020 19:04:43 +0000 (-0400) Subject: Rename AM_PATH_PYTHON_MODULES to AE_PATH_PYTHON_MODULES X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=commitdiff_plain;h=e015bae2ef343b30c890eebb9182a8be13d12ed0 Rename AM_PATH_PYTHON_MODULES to AE_PATH_PYTHON_MODULES The AM prefix is reserved for upstream automake macros, use our own AE prefix which stands for "Autotools EfficiOS". This is part of an effort to standardize our custom macros across all our autotools based projects. Signed-off-by: Michael Jeanson Signed-off-by: Jérémie Galarneau Change-Id: If5e94c7fa6df2d368c3cb9ae14c080caf2c27837 --- diff --git a/configure.ac b/configure.ac index 24a2d212..70cd018a 100644 --- a/configure.ac +++ b/configure.ac @@ -478,7 +478,7 @@ AE_IF_FEATURE_ENABLED([python-plugins], # Always check for python, we will fail later if some features require it and # it's unavailable. AM_PATH_PYTHON([3.0], [ - AM_PATH_PYTHON_MODULES([PYTHON]) + AE_PATH_PYTHON_MODULES([PYTHON]) # pythondir is the path where extra modules are to be installed pythondir=$PYTHON_PREFIX/$PYTHON_MODULES_PATH diff --git a/m4/ae_python_modules.m4 b/m4/ae_python_modules.m4 new file mode 100644 index 00000000..f2942ffb --- /dev/null +++ b/m4/ae_python_modules.m4 @@ -0,0 +1,23 @@ +# SPDX-License-Identifier: FSFULLR +# +# Copyright (C) 2014 Jérémie Galarneau +# +# ae_python_modules.m4 -- Get the Python modules install path + +# While extra Python modules are generaly installed in the Python +# interpreter's "site-packages" directory, Debian prefers using the +# "dist-packages" nomenclature. This macro uses the interpreter +# designated by the PYTHON variable to check the interpreter's PATH +# and sets the PYTHON_MODULES_PATH by taking the prefix into account. + +#serial 1 + +# AE_PATH_PYTHON_MODULES(PYTHON) +# --------------------------------------------------------------------------- +AC_DEFUN([AE_PATH_PYTHON_MODULES], + [prog="import sys +for path in sys.path: + if path.endswith(\"-packages\"): + print(path[[path.find(\"/lib\"):]]) + break" + PYTHON_MODULES_PATH=`${$1} -c "$prog"`]) diff --git a/m4/bt_python_modules.m4 b/m4/bt_python_modules.m4 deleted file mode 100644 index e6955fc7..00000000 --- a/m4/bt_python_modules.m4 +++ /dev/null @@ -1,21 +0,0 @@ -# SPDX-License-Identifier: FSFULLR -# -# Copyright (C) 2014 Jérémie Galarneau -# -# bt_python_modules.m4 -- Get the Python modules install path - -# While extra Python modules are generaly installed in the Python -# interpreter's "site-packages" directory, Debian prefers using the -# "dist-packages" nomenclature. This macro uses the interpreter -# designated by the PYTHON variable to check the interpreter's PATH -# and sets the PYTHON_MODULES_PATH by taking the prefix into account. - -# AM_PATH_PYTHON_MODULES(PYTHON) -# --------------------------------------------------------------------------- -AC_DEFUN([AM_PATH_PYTHON_MODULES], - [prog="import sys -for path in sys.path: - if path.endswith(\"-packages\"): - print(path[[path.find(\"/lib\"):]]) - break" - PYTHON_MODULES_PATH=`${$1} -c "$prog"`])