Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "build,windows: implement PEP514 python detection" #17293

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 0 additions & 51 deletions tools/msvs/find_python.cmd

This file was deleted.

25 changes: 9 additions & 16 deletions vcbuild.bat
Original file line number Diff line number Diff line change
@@ -254,7 +254,8 @@ goto run
if defined noprojgen goto msbuild

@rem Generate the VS project.
call :run-python configure %configure_flags% --dest-cpu=%target_arch% --tag=%TAG% %link_module%
echo configure %configure_flags% --dest-cpu=%target_arch% --tag=%TAG% %link_module%
python configure %configure_flags% --dest-cpu=%target_arch% --tag=%TAG% %link_module%
if errorlevel 1 goto create-msvs-files-failed
if not exist node.sln goto create-msvs-files-failed
echo Project files generated.
@@ -443,7 +444,7 @@ if defined test_node_inspect goto node-test-inspect
goto node-tests

:node-check-deopts
call :run-python tools\test.py --mode=release --check-deopts parallel sequential -J
python tools\test.py --mode=release --check-deopts parallel sequential -J
if defined test_node_inspect goto node-test-inspect
goto node-tests

@@ -465,7 +466,8 @@ if "%config%"=="Debug" set test_args=--mode=debug %test_args%
if "%config%"=="Release" set test_args=--mode=release %test_args%
echo running 'cctest %cctest_args%'
"%config%\cctest" %cctest_args%
call :run-python tools\test.py %test_args%
echo running 'python tools\test.py %test_args%'
python tools\test.py %test_args%
goto test-v8

:test-v8
@@ -477,7 +479,7 @@ goto lint-cpp
:lint-cpp
if not defined lint_cpp goto lint-js
call :run-lint-cpp src\*.c src\*.cc src\*.h test\addons\*.cc test\addons\*.h test\addons-napi\*.cc test\addons-napi\*.h test\cctest\*.cc test\cctest\*.h test\gc\binding.cc tools\icu\*.cc tools\icu\*.h
call :run-python tools/check-imports.py
python tools/check-imports.py
goto lint-js

:run-lint-cpp
@@ -493,7 +495,7 @@ for /f "tokens=*" %%G in ('dir /b /s /a %*') do (
( endlocal
set cppfilelist=%localcppfilelist%
)
call :run-python tools/cpplint.py %cppfilelist% > nul
python tools/cpplint.py %cppfilelist% > nul
goto exit

:add-to-list
@@ -553,14 +555,6 @@ echo vcbuild.bat link-module my_module.js : bundles my_module as built-in modu
echo vcbuild.bat lint : runs the C++ and JavaScript linter
goto exit

:run-python
call tools\msvs\find_python.cmd
if errorlevel 1 echo Could not find python2 & goto :exit
set cmd1="%VCBUILD_PYTHON_LOCATION%" %*
echo %cmd1%
%cmd1%
exit /b %ERRORLEVEL%

:exit
goto :EOF

@@ -573,9 +567,8 @@ rem ***************
set NODE_VERSION=
set TAG=
set FULLVERSION=
:: Call as subroutine for validation of python
call :run-python tools\getnodeversion.py > nul
for /F "tokens=*" %%i in ('"%VCBUILD_PYTHON_LOCATION%" tools\getnodeversion.py') do set NODE_VERSION=%%i

for /F "usebackq tokens=*" %%i in (`python "%~dp0tools\getnodeversion.py"`) do set NODE_VERSION=%%i
if not defined NODE_VERSION (
echo Cannot determine current version of Node.js
exit /b 1