-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
Accept Python 3 on Windows #29236
Accept Python 3 on Windows #29236
Conversation
When looking for Python in the registry, as specified in PEP514, this was not able to handle installations in a path with spaces, like Program Files. This ensures the whole path is used, fixing the issue.
If there is no Python 2 available, use Python 3. This allows to test running configure with Python 3.
This comment has been minimized.
This comment has been minimized.
I am not a Windows guy so patience please... |
Under
Possibly, but isn't that mostly for people running multiple versions? Is that worth the complexity for our case? For node-gyp that would make more sense I think, if someone has the time to implement it. Here, we should make sure an installation of Python with all things default works - that's why the PEP514 detection was added: nodejs/CTC#147 (comment). For someone wanting to customize, it's reasonable to assume they can add Python to the path. |
@nodejs/python @nodejs/platform-windows @nodejs/build-files This could use some reviews. It's not clear to me if this should be blocked on #25878 or not. Based on @joaocgreis's comment, I'd say not, but I'd love someone else's opinion (especially @joaocgreis's!). |
What happens on a Windows box when this is run? How far does it get and what are the results? What cannot be achieved by doing python3 configure.py? Our current Python 3.6 runs on Travis Linux run for 50 minutes before timing out. I would be interested to see our builds get to some interesting place before we open the experimentation to a broad audience. As discussed at #29196 (comment) there are several vectors of testing that I believe we should shape up before opening the floodgates with #25878 and #29236.
|
This comment has been minimized.
This comment has been minimized.
Explained at 9m30s into |
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.
Given the state of #25789, I think we are ready to land this one.
What are the results of python3.6 configure.py ?
I think this can land. Building with Python 3 does not work, but the error is clear and this allows for experimentation. @cclauss running
Running this together with #25878 is a better option, this is what happens:
|
Feel free to cherrypick in #29371 if it helps you make progress. It would be cool if we could set up a Jenkins, Travis CI, or GitHub Actions-based CI, or other CI that exercised Python 3 on Windows. |
My review was requested but I don't think I'm the right person to sign off on this. My Windows shell scripting skills are close to non-existent. |
FWIW, since this has been open for more than a week, one approval is enough to land it as long as there isn't any opposition to it (which I'm not seeing any) and CI passes (which it did). |
@@ -689,6 +689,9 @@ goto exit | |||
|
|||
:create-msvs-files-failed | |||
echo Failed to create vc project files. | |||
if %VCBUILD_PYTHON_VERSION%==3 ( | |||
echo Python 3 is not yet fully supported, to avoid issues Python 2 should be installed. |
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.
Nit that can totally be ignored, especially since this message eventually will go away anyway.
echo Python 3 is not yet fully supported, to avoid issues Python 2 should be installed. | |
echo Python 3 is not yet fully supported. To avoid issues, Python 2 should be installed. |
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.
A bit rubber-stamp-y of me since I don't have a Windows machine available to test on, but LGTM as far as I can tell.
When looking for Python in the registry, as specified in PEP514, this was not able to handle installations in a path with spaces, like Program Files. This ensures the whole path is used, fixing the issue. PR-URL: #29236 Reviewed-By: Christian Clauss <[email protected]> Reviewed-By: Rich Trott <[email protected]>
If there is no Python 2 available, use Python 3. This allows to test running configure with Python 3. PR-URL: #29236 Reviewed-By: Christian Clauss <[email protected]> Reviewed-By: Rich Trott <[email protected]>
Landed in ab841d5...d18b6a7 |
@Trott thanks for landing this! |
When looking for Python in the registry, as specified in PEP514, this was not able to handle installations in a path with spaces, like Program Files. This ensures the whole path is used, fixing the issue. PR-URL: #29236 Reviewed-By: Christian Clauss <[email protected]> Reviewed-By: Rich Trott <[email protected]>
If there is no Python 2 available, use Python 3. This allows to test running configure with Python 3. PR-URL: #29236 Reviewed-By: Christian Clauss <[email protected]> Reviewed-By: Rich Trott <[email protected]>
When looking for Python in the registry, as specified in PEP514, this was not able to handle installations in a path with spaces, like Program Files. This ensures the whole path is used, fixing the issue. PR-URL: #29236 Reviewed-By: Christian Clauss <[email protected]> Reviewed-By: Rich Trott <[email protected]>
If there is no Python 2 available, use Python 3. This allows to test running configure with Python 3. PR-URL: #29236 Reviewed-By: Christian Clauss <[email protected]> Reviewed-By: Rich Trott <[email protected]>
When looking for Python in the registry, as specified in PEP514, this was not able to handle installations in a path with spaces, like Program Files. This ensures the whole path is used, fixing the issue. PR-URL: nodejs#29236 Reviewed-By: Christian Clauss <[email protected]> Reviewed-By: Rich Trott <[email protected]>
If there is no Python 2 available, use Python 3. This allows to test running configure with Python 3. PR-URL: nodejs#29236 Reviewed-By: Christian Clauss <[email protected]> Reviewed-By: Rich Trott <[email protected]>
This loosely depends on #25878. Doesn't make much sense without it, but doesn't break either.
This allows Python 3 to be used, but only if it is the only Python version installed. #25878 does this for
configure
, this PR does forvcbuild
.If Python 3 is being used and
configure
fails, a warning is displayed.cc @nodejs/platform-windows @nodejs/python @cclauss
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes