Skip to content

Conversation

@aslonnie
Copy link
Collaborator

@aslonnie aslonnie commented Oct 31, 2025

add --use-pep517 flag; otherwise some part of the wheel building logic does not work on windows python 3.12

also removes the unnecessary "uninstall+reinstall" dance. the script only builds the wheel, it does not (and should not) install the wheel.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors the Windows wheel building script to improve its reliability and maintainability. The key changes include removing the intermediate step of installing Ray before building the wheel, pinning build dependencies for reproducible builds, and explicitly using the modern PEP 517 build process. These are excellent improvements. I've added a couple of suggestions to further enhance the script's efficiency and debuggability.

Comment on lines +103 to +104
python -m pip install pip==25.2
python -m pip install wheel==0.45.1 delvewheel==1.11.2 setuptools==80.9.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

These two pip install commands can be combined into a single one for better efficiency. This reduces the number of pip invocations and allows pip to perform dependency resolution for all packages at once.

Suggested change
python -m pip install pip==25.2
python -m pip install wheel==0.45.1 delvewheel==1.11.2 setuptools==80.9.0
python -m pip install pip==25.2 wheel==0.45.1 delvewheel==1.11.2 setuptools==80.9.0

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For consistency with the ray wheel build command on line 116 and for better debuggability, consider adding the --debug flag to this command as well. It will provide more verbose output, which is helpful for diagnosing CI failures.

Suggested change
RAY_INSTALL_CPP=1 python -m pip wheel -v -w dist . --no-deps --use-pep517
RAY_INSTALL_CPP=1 python -m pip wheel -v -w dist . --no-deps --debug --use-pep517

do not install ray or its dependencies when building wheel,
it is not required

Signed-off-by: Lonnie Liu <[email protected]>
@aslonnie aslonnie force-pushed the lonnie-251030-winwhlfix2 branch from 2d1817b to 216a6b9 Compare October 31, 2025 16:50
@aslonnie aslonnie changed the title another try on windows wheel building [wheel] fix windows wheel building Oct 31, 2025
@aslonnie aslonnie requested review from a team and dayshah October 31, 2025 16:56
@aslonnie aslonnie added the go add ONLY when ready to merge, run all tests label Oct 31, 2025
@aslonnie
Copy link
Collaborator Author

@ray-gardener ray-gardener bot added core Issues that should be addressed in Ray Core devprod labels Oct 31, 2025
@aslonnie aslonnie merged commit 6a375b2 into master Oct 31, 2025
8 checks passed
@aslonnie aslonnie deleted the lonnie-251030-winwhlfix2 branch October 31, 2025 20:25
YoussefEssDS pushed a commit to YoussefEssDS/ray that referenced this pull request Nov 8, 2025
add `--use-pep517` flag; otherwise some part of the wheel building logic
does not work on windows python 3.12

also removes the unnecessary "uninstall+reinstall" dance. the script
only builds the wheel, it does not (and should not) install the wheel.

Signed-off-by: Lonnie Liu <[email protected]>
landscapepainter pushed a commit to landscapepainter/ray that referenced this pull request Nov 17, 2025
add `--use-pep517` flag; otherwise some part of the wheel building logic
does not work on windows python 3.12

also removes the unnecessary "uninstall+reinstall" dance. the script
only builds the wheel, it does not (and should not) install the wheel.

Signed-off-by: Lonnie Liu <[email protected]>
Aydin-ab pushed a commit to Aydin-ab/ray-aydin that referenced this pull request Nov 19, 2025
add `--use-pep517` flag; otherwise some part of the wheel building logic
does not work on windows python 3.12

also removes the unnecessary "uninstall+reinstall" dance. the script
only builds the wheel, it does not (and should not) install the wheel.

Signed-off-by: Lonnie Liu <[email protected]>
Signed-off-by: Aydin Abiar <[email protected]>
SheldonTsen pushed a commit to SheldonTsen/ray that referenced this pull request Dec 1, 2025
add `--use-pep517` flag; otherwise some part of the wheel building logic
does not work on windows python 3.12

also removes the unnecessary "uninstall+reinstall" dance. the script
only builds the wheel, it does not (and should not) install the wheel.

Signed-off-by: Lonnie Liu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Issues that should be addressed in Ray Core devprod go add ONLY when ready to merge, run all tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants