Skip to content

Commit 91943a9

Browse files
rvaggFishrock123
authored andcommitted
build: use %PYTHON% instead of python
Like libuv does. Originally: node-forward/node#21 PR-URL: #1444 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]> Conflicts: vcbuild.bat
1 parent 51d0808 commit 91943a9

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

vcbuild.bat

+6-4
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,12 @@ if defined noprojgen goto msbuild
8989

9090
if defined NIGHTLY set TAG=nightly-%NIGHTLY%
9191

92+
if not defined PYTHON set PYTHON=python
93+
9294
@rem Generate the VS project.
9395
SETLOCAL
9496
if defined VS100COMNTOOLS call "%VS100COMNTOOLS%\VCVarsQueryRegistry.bat"
95-
python configure %download_arg% %i18n_arg% %debug_arg% %snapshot_arg% %noetw_arg% %noperfctr_arg% --dest-cpu=%target_arch% --tag=%TAG%
97+
"%PYTHON%" configure %download_arg% %i18n_arg% %debug_arg% %snapshot_arg% %noetw_arg% %noperfctr_arg% --dest-cpu=%target_arch% --tag=%TAG%
9698
if errorlevel 1 goto create-msvs-files-failed
9799
if not exist node.sln goto create-msvs-files-failed
98100
echo Project files generated.
@@ -174,14 +176,14 @@ if "%config%"=="Release" set test_args=--mode=release %test_args%
174176
echo running 'cctest'
175177
"%config%\cctest"
176178
echo running 'python tools/test.py %test_args%'
177-
python tools/test.py %test_args%
179+
"%PYTHON%" tools/test.py %test_args%
178180
goto jslint
179181

180182
:jslint
181183
if not defined jslint goto exit
182184
echo running jslint
183185
set PYTHONPATH=tools/closure_linter/;tools/gflags/
184-
python tools/closure_linter/closure_linter/gjslint.py --unix_mode --strict --nojsdoc -r lib/ -r src/ --exclude_files lib/punycode.js
186+
"%PYTHON%" tools/closure_linter/closure_linter/gjslint.py --unix_mode --strict --nojsdoc -r lib/ -r src/ --exclude_files lib/punycode.js
185187
goto exit
186188

187189
:create-msvs-files-failed
@@ -206,6 +208,6 @@ rem ***************
206208

207209
:getnodeversion
208210
set NODE_VERSION=
209-
for /F "usebackq tokens=*" %%i in (`python "%~dp0tools\getnodeversion.py"`) do set NODE_VERSION=%%i
211+
for /F "usebackq tokens=*" %%i in (`"%PYTHON%" "%~dp0tools\getnodeversion.py"`) do set NODE_VERSION=%%i
210212
if not defined NODE_VERSION echo Cannot determine current version of io.js & exit /b 1
211213
goto :EOF

0 commit comments

Comments
 (0)