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 13:53:41 +0200
Newsgroups gmane.comp.gnu.global.bugs
Message-ID <17054890.7ycxSsYEdt@ravel>
Hi,

> Wouldn't it be more appropriate to rename this option to
> '--with-python-interpreter'?

May be. Depends on your point of view.

The letter of:
https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.71/autoconf.html#Site-Configuration
isn't clear on this specific situation.

It is true that the '--with-' prefix is normally reserved for interfacing with external packages, which would seem to be the case here. However, the Pygments parser is not really "installed" (in a Python sense) and is always provided, whether Python/Pygments are installed or not. And, for the record, I prefer it like that: No hard dependencies, but if I have Python and Pygments installed, I can use them.

What the current option only does is simply modifying a shebang line, and according to the text below '--with-package' in the document you cited:
"""Do not use a ‘--with’ option to specify the file name to use to find certain files. That is outside the scope of what ‘--with’ options are for."""

So perhaps the real GNU-compliant solution is just to declare an environment variable that can override the default shebang.

The same reasoning would apply to '--with-exuberant-ctags' and '--with-universal-ctags' (and the DIR argument to '--with-sqlite3'). For backwards compatibility and simplicity, I would understand that you prefer to keep existing things as they are, and that you prefer '--with-python-interpreter' for consistency with those.

In the end, I don't think being that picky in this case matters that much, so really I don't mind changing "--enable-python-interpreter" to "--with-python-interpreter" or an environment variable.

What do you prefer?

Regards,
Olivier