Skip to content

Commit

Permalink
bpo-38809: Windows build scripts use python.exe from virtual envs (GH…
Browse files Browse the repository at this point in the history
…-17164)

https://bugs.python.org/issue38809
(cherry picked from commit ee703cb)

Co-authored-by: Tal Einat <taleinat+github@gmail.com>
  • Loading branch information
miss-islington and taleinat committed Nov 18, 2019
1 parent ca877c7 commit cbbf109
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
On Windows, build scripts will now recognize and use python.exe from an
active virtual env.
3 changes: 3 additions & 0 deletions PCbuild/find_python.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit cbbf109

Please sign in to comment.