[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Don't detect the Python shebang line at build-time; Don't use AM_PAT
From: |
Shigio YAMAGUCHI |
Subject: |
Re: Don't detect the Python shebang line at build-time; Don't use AM_PATH_PYTHON |
Date: |
Fri, 14 Apr 2023 20:41:25 +0900 |
Wouldn't it be more appropriate to rename this option to
'--with-python-interpreter'?
[http://gnu.ist.utl.pt/prep/standards/html_node/Configuration.html]
'--enable-feature[=parameter]'
Configure the package to build and install an optional
user-level facility
called feature. This allows users to choose which optional
features to include.
Giving an optional parameter of ‘ no’ should omit feature, if
it is built
by default. No ‘ --enable’ option should ever cause one
feature to replace
another. No ‘ --enable’ option should ever substitute one
useful behavior
for another useful behavior. The only proper use for ‘ --enable’ is for
questions of whether to build part of the program or exclude it.
Regards,
Shigio
On Thu, Apr 6, 2023 at 10:20 PM Olivier Certner <ocert.dev@free.fr> wrote:
>
> Hello,
>
> - What is your environment (OS)?
> FreeBSD 13
> - Which version of Global are you using?
> 6.6.9
> - What did you do?
> ./configure
> - What did you expect from it?
> Don't try to detect a Python installation at build time and don't pickup the
> corresponding Python executable to generate the shebang line for the Pygments
> parser.
> Instead, use a reasonable default line, like "#!/usr/bin/env python", so that
> resolution happens at run-time.
> Also, I don't expect './configure --help' to present such options:
> --with-python-sys-prefix, --with-python_prefix, --with-python_exec_prefix.
> They are relevant only when a Python module is actually installed (which is
> not the case for Global).
>
> It may however be useful to be able to specify a specific shebang line.
> Please see the attached patch, which provides '--enable-python-interpreter'
> to force a Python shebang line (the PYTHON environment variable also works).
>
> If you absolutely want to keep the detection-at-compile-time feature (which I
> advise against), I can propose another patch so that the "detect" special
> value for '--enable-python-interpreter' triggers some auto-detection at build
> time. In any case, AM_PATH_PYTHON must not be used as long as no Python
> module is installed.
>
> Regards.
>
> --
> Olivier Certner
--
Shigio YAMAGUCHI <shigio@gnu.org>
PGP fingerprint:
26F6 31B4 3D62 4A92 7E6F 1C33 969C 3BE3 89DD A6EB