bug-automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#51225: Possible bug in python.m4, automake 1.16.4+


From: bluemoon
Subject: bug#51225: Possible bug in python.m4, automake 1.16.4+
Date: Fri, 15 Oct 2021 09:58:26 +0200

Hi,

in commit

https://git.savannah.gnu.org/cgit/automake.git/commit/m4/python.m4?id=ed8daa069a6c8ed34f7856c42402ec46f305e670

line 160 of python.m4

you changed the sed command so that am_cv_python_pythondir does not
contain the content of $PYTHON_PREFIX anymore but the variable name $PYTHON_PREFIX. The same with $PYTHON_EXEC_PREFIX a couple of lines below.

For reference:

@@ -157,13 +224,13 @@ sys.stdout.write(sitedir)"`
      case $am_cv_python_pythondir in
      $am_py_prefix*)
        am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'`
- am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"` + am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,\\${PYTHON_PREFIX},"`
        ;;
      *)
        case $am_py_prefix in
          /usr|/System*) ;;
          *)
- am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages + am_cv_python_pythondir="\${PYTHON_PREFIX}/lib/python$PYTHON_VERSION/site-packages"
          ;;
        esac
        ;;

However, this change leads to pkg-config .pc files containing the
variable name $PYTHON_PREFIX, not its content, which makes third
packages fail to build because $PYTHON_PREFIX cannot be resolved.

For example xcb-proto.pc, a dependency of polybar, has the line

pythondir=${pc_sysrootdir}${PYTHON_PREFIX}/lib/python3.10/site-packages

but it should be

pythondir=${pc_sysrootdir}${prefix}/lib/python3.10/site-packages

which can be achieved when reverting the double backslash like

--- a/m4/python.m4      2021-10-04 04:51:12.000000000 +0200
+++ b/m4/python.m4      2021-10-15 08:38:08.575081215 +0200
@@ -263,7 +263,7 @@
    case $am_cv_python_pythondir in
    $am_py_prefix*)
      am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'`
- am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,\\${PYTHON_PREFIX},"` + am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,${PYTHON_PREFIX},"`
      ;;
    *)
      case $am_py_prefix in
@@ -305,7 +305,7 @@
    case $am_cv_python_pyexecdir in
    $am_py_exec_prefix*)
      am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'`
- am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,\\${PYTHON_EXEC_PREFIX},"` + am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,${PYTHON_EXEC_PREFIX},"`
      ;;
    *)
      case $am_py_exec_prefix in


Using --with-python-sys-prefix makes no difference.

So is the double backslash intented or by accident?
Or am I completely misunderstanding something?


Thank you!





reply via email to

[Prev in Thread] Current Thread [Next in Thread]