You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@solr.apache.org by ds...@apache.org on 2026/09/27 18:46:29 UTC
(solr) 05/06: releaseWizard: run python subcommands with the wizard's own interpreter
This is an automated email from the ASF dual-hosted git repository.
asf-gitbox-commits pushed a commit to branch branch_9_11
in repository https://gitbox.apache.org/repos/asf/solr.git
commit 4e056857989d93f3498d7b8c94ebf9f3044a1556
Author: David Smiley <ds...@apache.org>
AuthorDate: Sun Sep 27 13:38:17 2026 -0400
releaseWizard: run python subcommands with the wizard's own interpreter
Command.get_cmd() emitted a literal 'python3', which resolves against
PATH rather than the interpreter the wizard itself was launched with
(e.g. a venv with the deps from requirements.txt). Rewrite a leading
'python3' to sys.executable so subcommands like logchange.py run with
the same interpreter and dependencies.
Co-Authored-By: Claude Sonnet 5 <no...@anthropic.com>
---
dev-tools/scripts/releaseWizard.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dev-tools/scripts/releaseWizard.py b/dev-tools/scripts/releaseWizard.py
index 8bdbc45cd59..cd0c3d9597e 100755
--- a/dev-tools/scripts/releaseWizard.py
+++ b/dev-tools/scripts/releaseWizard.py
@@ -1873,7 +1873,8 @@ class Command(SecretYamlObject):
return self.jinjaify(self.redirect)
def get_cmd(self):
- return self.jinjaify(self.cmd, join=True)
+ # Run python scripts with this interpreter (e.g. a venv), not whatever python3 is on PATH
+ return re.sub(r'^python3(?=\s)', lambda _: shlex.quote(sys.executable), self.jinjaify(self.cmd, join=True))
def get_vars(self):
myvars = {}