Skip to content

Commit ee703cb

Browse files
taleinatmiss-islington
authored andcommitted
bpo-38809: Windows build scripts use python.exe from virtual envs (GH-17164)
https://bugs.python.org/issue38809
1 parent bc7d3aa commit ee703cb

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
On Windows, build scripts will now recognize and use python.exe from an
2+
active virtual env.

PCbuild/find_python.bat

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@
2424
:begin_search
2525
@set PYTHON=
2626

27+
@rem If there is an active virtual env, use that one
28+
@if NOT "%VIRTUAL_ENV%"=="" (set PYTHON="%VIRTUAL_ENV%\Scripts\python.exe") & (set _Py_Python_Source=found in virtual env) & goto :found
29+
2730
@set _Py_EXTERNALS_DIR=%EXTERNALS_DIR%
2831
@if "%_Py_EXTERNALS_DIR%"=="" (set _Py_EXTERNALS_DIR=%~dp0\..\externals)
2932

0 commit comments

Comments
 (0)