Uh oh!
There was an error while loading. Please reload this page.
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.
cclauss
commented
Aug 21, 2019
I am not a Windows guy so patience please... |
joaocgreis
commented
Aug 21, 2019
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. |
Trott
commented
Aug 23, 2019
@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.
cclauss
commented
Aug 25, 2019
Explained at 9m30s into |
joaocgreis
commented
Aug 29, 2019
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: |
cclauss
commented
Aug 29, 2019
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. |
bnoordhuis
commented
Aug 30, 2019
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. |
Trott
commented
Aug 31, 2019
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). |
| :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.
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. |
Trott
left a comment
There was a problem hiding this comment.
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.
Trott
commented
Sep 3, 2019
Landed in ab841d5...d18b6a7 |
joaocgreis
commented
Sep 3, 2019
@Trott thanks for landing this! |
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
configurefails, a warning is displayed.cc @nodejs/platform-windows @nodejs/python @cclauss
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes