bpo-38809: Windows build scripts use python.exe from virtual envs (GH-17164)

https://bugs.python.org/issue38809
This commit is contained in:
Tal Einat 2019-11-18 19:32:25 +02:00 committed by Miss Islington (bot)
parent bc7d3aa6d7
commit ee703cbb41
2 changed files with 5 additions and 0 deletions

View File

@ -0,0 +1,2 @@
On Windows, build scripts will now recognize and use python.exe from an
active virtual env.

View File

@ -24,6 +24,9 @@
:begin_search
@set PYTHON=
@rem If there is an active virtual env, use that one
@if NOT "%VIRTUAL_ENV%"=="" (set PYTHON="%VIRTUAL_ENV%\Scripts\python.exe") & (set _Py_Python_Source=found in virtual env) & goto :found
@set _Py_EXTERNALS_DIR=%EXTERNALS_DIR%
@if "%_Py_EXTERNALS_DIR%"=="" (set _Py_EXTERNALS_DIR=%~dp0\..\externals)