-
Notifications
You must be signed in to change notification settings - Fork 64
Make build-script-helper.py use python3 #956
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
Conversation
@swift-ci test |
@swift-ci test |
@swift-ci test |
1 similar comment
@swift-ci test |
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.
Would it make sense to pull these changes into the update-node
branch/PR?
When I try building the new image from the associated swift-docker PR, I'm getting an error from running npm ci
(not sure why but most likely since this branch is still using/checking the older node version while that PR updates the node version in the Dockerfile)
My idea was:
does this make sense?
I have cherry-picked 73b3197 into #952 to unblock your testing. We can close this PR if you prefer! The other 2 commits are very minor things. |
By aiming to update the Node version to 22.17.0 on Swift Docker for Swift DocC Render [1], we need to specify the version 3 of python, otherwise it will try to use python 2 which it's not available in Node 22. [1] swiftlang/swift-docker#487
Removed from __future__ import print_function on line 16, which is not needed in Python 3 since print() is already a function by default.
Updated the node version check to properly handle the fact that subprocess.check_output() returns bytes in Python 3, not strings. Added code to decode bytes to UTF-8 string and strip whitespace before checking the version.
@swift-ci test |
I think that makes sense, and I see now why you did it that way. Sorry for the confusion |
Bug/issue #156708326, if applicable:
Summary
By aiming to update the Node version to 22.17.0 on Swift Docker for Swift DocC Render [1], we need to specify version 3 of python, otherwise it will try to use python 2 which it's not available in Node 22.
[1] swiftlang/swift-docker#487
Dependencies
This change unblocks this PR in Swift Docker: swiftlang/swift-docker#487
Testing
Steps:
Checklist
Make sure you check off the following items. If they cannot be completed, provide a reason.
npm test
, and it succeeded