You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@solr.apache.org by ab...@apache.org on 2026/09/28 09:22:57 UTC
(solr) 02/04: releaseWizard: run python subcommands with the wizard's own interpreter
This is an automated email from the ASF dual-hosted git repository.
sigram pushed a commit to branch branch_10x
in repository https://gitbox.apache.org/repos/asf/solr.git
commit b4606ca8b98c7e91d23b05f3303b970580fc14f9
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>
(cherry picked from commit 4e056857989d93f3498d7b8c94ebf9f3044a1556)
---
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 a2813ae53d5..b3a59c56ca5 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 = {}