Bug#523031: Bug#523030: wrong quoting in aclocal's python.m4 check
Hello Matthias, * Matthias Klose wrote on Tue, Apr 14, 2009 at 09:13:24AM CEST: > '${prefix}' and '${exec_prefix}' are passed unexpanded to get_python_lib()), > and > the macro then defaults to the hardcoded alternative case. The patch passes > the > real path names to get_python_lib(), and only for the case, where the prefix > argument was specified on the command line (the case for a missing prefix > argument is handled inside the get_python_lib() function). > > tested the macro with python versions 2.0 up to trunk, and the 3.0 and 3.1 > branches. Thanks for the bug report and patch. The way I read "info Automake Python", the non-expanded '${prefix}' and '${exec_prefix}' were done on purpose. Now, I'm not a python expert, nor have I worked much with the Automake support code for python (except for accepting a patch into the git tree that adds python 3.0 support). Can you describe or provide an example that is fixed with your patch and broken without, and look over the above-mentioned section in the manual, to see whether it still describes the situation accurately with your patch? Thanks, Ralf -- To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#523030: wrong quoting in aclocal's python.m4 check
tags 523030 + patch tags 523031 + patch thanks '${prefix}' and '${exec_prefix}' are passed unexpanded to get_python_lib()), and the macro then defaults to the hardcoded alternative case. The patch passes the real path names to get_python_lib(), and only for the case, where the prefix argument was specified on the command line (the case for a missing prefix argument is handled inside the get_python_lib() function). tested the macro with python versions 2.0 up to trunk, and the 3.0 and 3.1 branches. Matthias --- m4/python.m4.orig 2009-04-10 16:39:16.0 +0200 +++ m4/python.m42009-04-12 15:21:41.0 +0200 @@ -117,7 +117,13 @@ dnl doesn't work. AC_CACHE_CHECK([for $am_display_PYTHON script directory], [am_cv_python_pythondir], -[am_cv_python_pythondir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(0,0,prefix='$PYTHON_PREFIX')" 2>/dev/null || +[if test "x$prefix" = xNONE + then + py_prefix_arg= + else + py_prefix_arg=",prefix='$prefix'" + fi + am_cv_python_pythondir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(0,0$py_prefix_arg)" -n -q install $py_prefix_arg 2>/dev/null || echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"`]) AC_SUBST([pythondir], [$am_cv_python_pythondir]) @@ -134,8 +140,14 @@ dnl doesn't work. AC_CACHE_CHECK([for $am_display_PYTHON extension module directory], [am_cv_python_pyexecdir], -[am_cv_python_pyexecdir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(1,0,prefix='$PYTHON_EXEC_PREFIX')" 2>/dev/null || - echo "${PYTHON_EXEC_PREFIX}/lib/python${PYTHON_VERSION}/site-packages"`]) +[if test "x$exec_prefix" = xNONE + then + py_exec_prefix_arg=$py_prefix_arg + else + py_exec_prefix_arg=",prefix='$exec_prefix'" + fi + am_cv_python_pyexecdir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(1,0$py_exec_prefix_arg)" -n -q install $py_exec_prefix_arg 2>/dev/null || + echo "$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages"`]) AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir]) dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE)
Bug#523030: wrong quoting in aclocal's python.m4 check
Package: automake1.10 Version: 1:1.10.1-3 Severity: serious ++ /usr/bin/python -c 'from distutils import sysconfig; print sysconfig.get_python_lib(0,0,prefix='\''${prefix}'\'')' this comes from: /usr/share/aclocal-1.10/python.m4: AC_SUBST([PYTHON_PREFIX], ['${prefix}']) AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}']) ... [am_cv_python_pythondir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(0,0,prefix='$PYTHON_PREFIX')" 2>/dev/null || echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"`]) the expanded $prefix has to be passed to the python -c command. so as long as the fallback points to the correct location, all is ok. For python2.6 we will use dist-packages instead of site-packages, so the fallback is wrong. same in automake-1.9 -- To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org