-
Notifications
You must be signed in to change notification settings - Fork 7k
[wheel] fix windows wheel building #58343
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -53,33 +53,15 @@ EOF | |||||
| source "$TEMP/refreshenv.sh" | ||||||
| } | ||||||
|
|
||||||
| install_ray() { | ||||||
| # TODO(mehrdadn): This function should be unified with the one in ci/ci.sh. | ||||||
| ( | ||||||
| pip install wheel delvewheel | ||||||
|
|
||||||
|
|
||||||
| pushd python/ray/dashboard/client | ||||||
| choco install nodejs --version=22.4.1 -y | ||||||
| refreshenv | ||||||
| # https://stackoverflow.com/questions/69692842/error-message-error0308010cdigital-envelope-routinesunsupported | ||||||
| export NODE_OPTIONS=--openssl-legacy-provider | ||||||
| npm install | ||||||
| npm run build | ||||||
| popd | ||||||
|
|
||||||
| cd "${WORKSPACE_DIR}"/python | ||||||
| pip install -v -e . | ||||||
| ) | ||||||
| } | ||||||
|
|
||||||
| uninstall_ray() { | ||||||
| pip uninstall -y ray | ||||||
|
|
||||||
| # Cleanup generated thirdparty files. | ||||||
| python -c $'import shutil; import sys; \nfor d in sys.argv[1:]: shutil.rmtree(d, ignore_errors=True);' \ | ||||||
| "${ROOT_DIR}/ray/thirdparty_files" \ | ||||||
| "${ROOT_DIR}/ray/_private/runtime_env/agent/thirdparty_files" | ||||||
| build_dashboard() { | ||||||
| pushd python/ray/dashboard/client | ||||||
| choco install nodejs --version=22.4.1 -y | ||||||
| refreshenv | ||||||
| # https://stackoverflow.com/questions/69692842/error-message-error0308010cdigital-envelope-routinesunsupported | ||||||
| export NODE_OPTIONS=--openssl-legacy-provider | ||||||
| npm install | ||||||
| npm run build | ||||||
| popd | ||||||
| } | ||||||
|
|
||||||
| build_wheel_windows() { | ||||||
|
|
@@ -88,9 +70,6 @@ build_wheel_windows() { | |||||
| exit 1 | ||||||
| fi | ||||||
|
|
||||||
| local ray_uninstall_status=0 | ||||||
| uninstall_ray || ray_uninstall_status=1 | ||||||
|
|
||||||
| local local_dir="python/dist" | ||||||
| { | ||||||
| echo "build --announce_rc"; | ||||||
|
|
@@ -119,28 +98,27 @@ build_wheel_windows() { | |||||
| fi | ||||||
|
|
||||||
| unset PYTHON2_BIN_PATH PYTHON3_BIN_PATH # make sure these aren't set by some chance | ||||||
| install_ray | ||||||
| build_dashboard | ||||||
|
|
||||||
| python -m pip install pip==25.2 | ||||||
| python -m pip install wheel==0.45.1 delvewheel==1.11.2 setuptools==80.9.0 | ||||||
|
|
||||||
| cd "${WORKSPACE_DIR}"/python | ||||||
| # Set the commit SHA in _version.py. | ||||||
| if [ -n "$BUILDKITE_COMMIT" ]; then | ||||||
| if [[ -n "${BUILDKITE_COMMIT:-}" ]]; then | ||||||
| sed -i.bak "s/{{RAY_COMMIT_SHA}}/$BUILDKITE_COMMIT/g" ray/_version.py && rm ray/_version.py.bak | ||||||
| else | ||||||
| echo "BUILDKITE_COMMIT variable not set - required to populated ray.__commit__." | ||||||
| exit 1 | ||||||
| fi | ||||||
|
|
||||||
| # build ray wheel | ||||||
| python -m pip wheel -v -w dist . --no-deps | ||||||
| python -m pip wheel -v -w dist . --no-deps --use-pep517 | ||||||
| # Pack any needed system dlls like msvcp140.dll | ||||||
| delvewheel repair dist/ray-*.whl | ||||||
| # build ray-cpp wheel | ||||||
| RAY_INSTALL_CPP=1 python -m pip wheel -v -w dist . --no-deps | ||||||
| # No extra dlls are needed, do not call delvewheel | ||||||
| uninstall_ray | ||||||
| RAY_INSTALL_CPP=1 python -m pip wheel -v -w dist . --no-deps --use-pep517 | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For consistency with the
Suggested change
|
||||||
| ) | ||||||
|
|
||||||
| if [ 0 -eq "${ray_uninstall_status}" ]; then # If Ray was previously installed, restore it | ||||||
| install_ray | ||||||
| fi | ||||||
| } | ||||||
|
|
||||||
| build_wheel_windows "$@" | ||||||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
These two
pip installcommands can be combined into a single one for better efficiency. This reduces the number ofpipinvocations and allowspipto perform dependency resolution for all packages at once.