@@ -176,24 +176,25 @@ jobs:
176
176
- name : Move and rename wheel files with pattern replacement
177
177
run : |
178
178
mkdir -p wheels/
179
+
180
+ # The whole point of the continuous release is to have a stable download link and the only way to have a PEP 440–compliant wheel name
181
+ # is to use a stable placeholder version. Otherwise, pip won't let you install the wheel. The cool thing is that we can now install the
182
+ # wheel directly from the GH pre-release which gets updated continuously, e.g.
183
+ # `pip install https://github.com/bitsandbytes-foundation/bitsandbytes/releases/download/continuous-release_main/bitsandbytes-1.33.7.preview-py3-none-manylinux_2_24_x86_64.whl`
184
+ STABLE_PLACEHOLDER_VERSION="1.33.7.preview"
185
+
179
186
# exclude macos wheels for now
180
187
find tmp/ -type f -name '*.whl' ! -name '*macos*' -print0 | while IFS= read -r -d '' wheel; do
181
188
wheel_filename=$(basename "$wheel")
182
- if [[ $wheel_filename == *linux*x86_64* ]]; then
183
- mv "$wheel" wheels/bnb-linux-x86_64.whl
184
- elif [[ $wheel_filename == *linux*aarch64* ]]; then
185
- mv "$wheel" wheels/bnb-linux-aarch64.whl
186
- elif [[ $wheel_filename == *macosx*x86_64* ]]; then
187
- mv "$wheel" wheels/bnb-macos-x86_64.whl
188
- elif [[ $wheel_filename == *macosx*arm64* ]]; then
189
- mv "$wheel" wheels/bnb-macos-arm64.whl
190
- elif [[ $wheel_filename == *win*amd64* ]]; then
191
- mv "$wheel" wheels/bnb-windows-x86_64.whl
192
- else
193
- echo "Unknown wheel format: $wheel_filename"
194
- exit 1
195
- fi
189
+
190
+ # Strip off the original version
191
+ rest=${wheel_filename#bitsandbytes-*-}
192
+ new_name="bitsandbytes-${STABLE_PLACEHOLDER_VERSION}-${rest}"
193
+
194
+ echo "Renaming $wheel_filename → $new_name"
195
+ mv "$wheel" "wheels/${new_name}"
196
196
done
197
+
197
198
- name : Inspect wheels directory after renaming files
198
199
run : ls -alFR wheels/
199
200
- name : Create release and upload artifacts
0 commit comments