Re: Don't detect the Python shebang line at build-time; Don't use AM_PATH_PYTHON
Olivier Certner <[email protected]> Mon, 17 Apr 2023 14:56:19 +0200
| Newsgroups | gmane.comp.gnu.global.bugs |
|---|---|
| Message-ID | <1762992.Dkrb29LB8r@ravel> |
> I will value the following two things: > o GNU Standard > o Consistency of configure options of Global > (--with-posix-sort, --with-universal-ctags and etc) Noted, but as said, I find these two requirements contradictory in the present situation. > So I cannot accept your patch as is. I'll rewrite it with '--with-' > prefix when I have time, but until then It will be suspended. > Anyway, thank you for the valuable patch. Here's a new patch attached. Hope this helps. Regards. -- Olivier Certner
python_shebang-v2.patch
(text/x-patch, 871 B)
--- configure.ac +++ configure.ac @@ -43,7 +43,19 @@ dnl dnl for "plugin-factory/pygments_parser.py" dnl -AM_PATH_PYTHON([2.6],,[PYTHON="/usr/bin/env python"]) +m4_define([PYTHON_INTERPRETER],[[/usr/bin/env python]]) +AC_ARG_WITH([python-interpreter], + [AS_HELP_STRING([--with-python-interpreter], + [the Python interpreter to use at run-time in the Pygments plugin]dnl +[ @<:@default=]m4_expand([PYTHON_INTERPRETER])[@:>@])], + [PYTHON=$withval], + [PYTHON=""]) +AS_IF([test x"$PYTHON" = x"no"], + [AC_MSG_ERROR([a Python interpreter command is needed (even if not installed)])], + [test x"$PYTHON" = x || test x"$PYTHON" = x"yes"], + [PYTHON="]m4_expand([PYTHON_INTERPRETER])["]) +AC_MSG_NOTICE([using "$PYTHON" as the shebang line's interpreter for 'pygments_parser.py']) +AC_SUBST([PYTHON]) AC_GNU_SOURCE