-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
build,windows: Implement python detection #13900
Conversation
0a2c33e
to
50bebc7
Compare
New CI: https://ci.nodejs.org/job/node-compile-windows/10007/ /cc @nodejs/build @nodejs/platform-windows |
vcbuild.bat
Outdated
@@ -513,8 +519,9 @@ rem *************** | |||
set NODE_VERSION= | |||
set TAG= | |||
set FULLVERSION= | |||
|
|||
for /F "usebackq tokens=*" %%i in (`python "%~dp0tools\getnodeversion.py"`) do set NODE_VERSION=%%i | |||
:: Call as subrutine for validation of python |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
subroutine
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ack.
a3cbff7
to
5e8e829
Compare
ping @nodejs/build @nodejs/platform-windows @nodejs/python @benjamingr @tniessen |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with the suggested changes. I think we should just deploy it and wait for people to complain about build problems, it is the only way to find out if there are any incompatibilities. It won't make things worse than they are as python
will still be used if it is in the PATH
.
tools/msvs/find_python.cmd
Outdated
:: Helper subroutine to handle quotes in %1 | ||
:find-main-branch | ||
SET main_key="%~1\Python\PythonCore" | ||
REG QUERY %main_key% /s | findstr "2." | findstr InstallPath > NUL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This prints error messages to my console before finding the correct key... Maybe add 2>&1
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ack.
tools/msvs/find_python.cmd
Outdated
) | ||
EXIT /B 1 | ||
|
||
:: Check if %p% hold a path to a real python2 executable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hold
→ holds
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ack.
Just an FYI, there are quite a few downstream builders, all sort of projects that build their own |
PR-URL: nodejs#13900 Fixes: nodejs#13882 Reviewed-By: Tobias Nießen <[email protected]>
606d52b
to
614dbbd
Compare
Windows sanity: https://ci.nodejs.org/job/node-test-commit-windows-fanned/10045/ ✔️ |
@@ -550,7 +557,4 @@ if not "%DISTTYPE%"=="custom" ( | |||
set TAG=%DISTTYPE%%DATESTRING%%COMMIT% | |||
) | |||
set FULLVERSION=%NODE_VERSION%-%TAG% | |||
|
|||
:exit | |||
if not defined DISTTYPEDIR set DISTTYPEDIR=%DISTTYPE% |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@refack I was not able to do a careful review of this PR, but this line caught my eye. Is there a good reason for completely removing this? I believe this will completely break or release process, if DISTTYPEDIR is not set.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Confirmed this breaks. Will try a fix in the build script instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Woops. Opening a reversion PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I removed it because of :exit
is redefined from L511
Fix PR #13969
PR-URL: #13900 Fixes: #13882 Reviewed-By: Tobias Nießen <[email protected]>
* rename :exit to :distexit PR-URL: nodejs#13969 Refs: nodejs#13900 (review) Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: João Reis <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Rod Vagg <[email protected]>
Land with #13969 |
* rename :exit to :distexit PR-URL: nodejs#13969 Refs: nodejs#13900 (review) Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: João Reis <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Rod Vagg <[email protected]>
PR-URL: #13900 Fixes: #13882 Reviewed-By: Tobias Nießen <[email protected]>
* rename :exit to :distexit PR-URL: #13969 Refs: #13900 (review) Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: João Reis <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Rod Vagg <[email protected]>
PR-URL: #13900 Fixes: #13882 Reviewed-By: Tobias Nießen <[email protected]>
* rename :exit to :distexit PR-URL: #13969 Refs: #13900 (review) Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: João Reis <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Rod Vagg <[email protected]>
Should this be backported to Please include all patches needed to make this atomic change work |
PR-URL: nodejs#13900 Fixes: nodejs#13882 Reviewed-By: Tobias Nießen <[email protected]>
* rename :exit to :distexit PR-URL: nodejs#13969 Refs: nodejs#13900 (review) Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: João Reis <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Rod Vagg <[email protected]>
Backport PR #14842 |
Backport-PR-URL: #14842 PR-URL: #13900 Fixes: #13882 Reviewed-By: Tobias Nießen <[email protected]>
* rename :exit to :distexit Backport-PR-URL: #14842 PR-URL: #13969 Refs: #13900 (review) Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: João Reis <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Rod Vagg <[email protected]>
Backport-PR-URL: #14842 PR-URL: #13900 Fixes: #13882 Reviewed-By: Tobias Nießen <[email protected]>
* rename :exit to :distexit Backport-PR-URL: #14842 PR-URL: #13969 Refs: #13900 (review) Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: João Reis <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Rod Vagg <[email protected]>
According to PEP 514
Fixes: #13882
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
build,tools,windows