From a56534ba79287daf61c35cd2e7abdb6570347db0 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Fri, 9 Jan 2026 20:44:58 +0100 Subject: [PATCH] Use the same Python executable instead of `python` `python` might be the wrong version, for example it might be Python 2 on some systems, or it might be a different version of Python 3. Use `sys.executable`, so that the same version gets used consistently. Signed-off-by: Gilles Peskine --- scripts/make_generated_files.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/make_generated_files.py b/scripts/make_generated_files.py index 73570fb28..5658799e5 100755 --- a/scripts/make_generated_files.py +++ b/scripts/make_generated_files.py @@ -33,7 +33,7 @@ class GenerationScript: # Executable to run the script, needed for Windows if script.suffix == ".py": - self.exe = "python" + self.exe = sys.executable elif script.suffix == ".pl": self.exe = "perl" @@ -62,7 +62,7 @@ def get_generation_script_files(generation_script: str): """ files = [] if generation_script.endswith(".py"): - cmd = ["python"] + cmd = [sys.executable] elif generation_script.endswith(".pl"): cmd = ["perl"] cmd += [generation_script, "--list"]