5353 source "$TEMP/refreshenv.sh"
5454}
5555
56- install_ray() {
57- # TODO(mehrdadn): This function should be unified with the one in ci/ci.sh.
58- (
59- pip install wheel delvewheel
60-
61-
62- pushd python/ray/dashboard/client
63- choco install nodejs --version=22.4.1 -y
64- refreshenv
65- # https://stackoverflow.com/questions/69692842/error-message-error0308010cdigital-envelope-routinesunsupported
66- export NODE_OPTIONS=--openssl-legacy-provider
67- npm install
68- npm run build
69- popd
70-
71- cd "${WORKSPACE_DIR}"/python
72- pip install -v -e .
73- )
74- }
75-
76- uninstall_ray() {
77- pip uninstall -y ray
78-
79- # Cleanup generated thirdparty files.
80- python -c $'import shutil; import sys; \nfor d in sys.argv[1:]: shutil.rmtree(d, ignore_errors=True);' \
81- "${ROOT_DIR}/ray/thirdparty_files" \
82- "${ROOT_DIR}/ray/_private/runtime_env/agent/thirdparty_files"
56+ build_dashboard() {
57+ pushd python/ray/dashboard/client
58+ choco install nodejs --version=22.4.1 -y
59+ refreshenv
60+ # https://stackoverflow.com/questions/69692842/error-message-error0308010cdigital-envelope-routinesunsupported
61+ export NODE_OPTIONS=--openssl-legacy-provider
62+ npm install
63+ npm run build
64+ popd
8365}
8466
8567build_wheel_windows() {
@@ -88,9 +70,6 @@ build_wheel_windows() {
8870 exit 1
8971 fi
9072
91- local ray_uninstall_status=0
92- uninstall_ray || ray_uninstall_status=1
93-
9473 local local_dir="python/dist"
9574 {
9675 echo "build --announce_rc";
@@ -119,28 +98,27 @@ build_wheel_windows() {
11998 fi
12099
121100 unset PYTHON2_BIN_PATH PYTHON3_BIN_PATH # make sure these aren't set by some chance
122- install_ray
101+ build_dashboard
102+
103+ python -m pip install pip==25.2
104+ python -m pip install wheel==0.45.1 delvewheel==1.11.2 setuptools==80.9.0
105+
123106 cd "${WORKSPACE_DIR}"/python
124107 # Set the commit SHA in _version.py.
125- if [ -n "$BUILDKITE_COMMIT" ]; then
108+ if [[ -n "${ BUILDKITE_COMMIT:-}" ] ]; then
126109 sed -i.bak "s/{{RAY_COMMIT_SHA}}/$BUILDKITE_COMMIT/g" ray/_version.py && rm ray/_version.py.bak
127110 else
128111 echo "BUILDKITE_COMMIT variable not set - required to populated ray.__commit__."
129112 exit 1
130113 fi
114+
131115 # build ray wheel
132- python -m pip wheel -v -w dist . --no-deps
116+ python -m pip wheel -v -w dist . --no-deps --use-pep517
133117 # Pack any needed system dlls like msvcp140.dll
134118 delvewheel repair dist/ray-*.whl
135119 # build ray-cpp wheel
136- RAY_INSTALL_CPP=1 python -m pip wheel -v -w dist . --no-deps
137- # No extra dlls are needed, do not call delvewheel
138- uninstall_ray
120+ RAY_INSTALL_CPP=1 python -m pip wheel -v -w dist . --no-deps --use-pep517
139121 )
140-
141- if [ 0 -eq "${ray_uninstall_status}" ]; then # If Ray was previously installed, restore it
142- install_ray
143- fi
144122}
145123
146124build_wheel_windows "$@"
0 commit comments