fix(python): use Scripts/ for venv executables on Windows

`+python-executable-find` hardcodes `bin/` as the virtualenv
executable directory, but Windows virtualenvs use `Scripts/`.

Ref: #5826
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
kovan 2026-02-13 23:52:38 +01:00 committed by Henrik Lissner
parent 2ebac3ccfc
commit 48da7e5de8

View file

@ -8,7 +8,7 @@ falling back on searching your PATH."
(if (file-name-absolute-p exe)
(and (file-executable-p exe)
exe)
(let ((exe-root (format "bin/%s" exe)))
(let ((exe-root (format (if (featurep :system 'windows) "Scripts/%s" "bin/%s") exe)))
(cond ((when python-shell-virtualenv-root
(let ((bin (expand-file-name exe-root python-shell-virtualenv-root)))
(if (file-exists-p bin) bin))))