bug-global
[Top][All Lists]
Advanced

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

Don't detect the Python shebang line at build-time; Don't use AM_PATH_PY


From: Olivier Certner
Subject: Don't detect the Python shebang line at build-time; Don't use AM_PATH_PYTHON
Date: Thu, 06 Apr 2023 14:27:47 +0200

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

Attachment: python_shebang.patch
Description: Text Data


reply via email to

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