Skip to content

Commit

Permalink
tools: add find pyenv path on windows
Browse files Browse the repository at this point in the history
PR-URL: #54314
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Chengzhong Wu <[email protected]>
  • Loading branch information
marco-ippolito authored and targos committed Oct 2, 2024
1 parent 87ca1d7 commit a7fdc60
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tools/msvs/find_python.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ for %%k in ( "HKCU\Software", "HKLM\SOFTWARE", "HKLM\Software\Wow6432Node") do (
if not errorlevel 1 goto :found-python
)

:: Check for pyenv-win installation using pyenv which python
for /f "tokens=*" %%i in ('pyenv which python 2^>nul') do set p=%%i
if defined p (
for /f "tokens=*" %%j in ('"%p%" --version') do set python_version=%%j
goto :found-python
)

goto :no-python


Expand Down

0 comments on commit a7fdc60

Please sign in to comment.