Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
bitsandbytes
Commits
f3adf4f6
Commit
f3adf4f6
authored
May 08, 2025
by
Titus von Koeller
Browse files
continuous release: fix for stable download link
parent
a8a42651
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
14 deletions
+15
-14
.github/workflows/python-package.yml
.github/workflows/python-package.yml
+15
-14
No files found.
.github/workflows/python-package.yml
View file @
f3adf4f6
...
@@ -176,24 +176,25 @@ jobs:
...
@@ -176,24 +176,25 @@ jobs:
-
name
:
Move and rename wheel files with pattern replacement
-
name
:
Move and rename wheel files with pattern replacement
run
:
|
run
:
|
mkdir -p wheels/
mkdir -p wheels/
# 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
# 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
# wheel directly from the GH pre-release which gets updated continuously, e.g.
# `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`
STABLE_PLACEHOLDER_VERSION="1.33.7.preview"
# exclude macos wheels for now
# exclude macos wheels for now
find tmp/ -type f -name '*.whl' ! -name '*macos*' -print0 | while IFS= read -r -d '' wheel; do
find tmp/ -type f -name '*.whl' ! -name '*macos*' -print0 | while IFS= read -r -d '' wheel; do
wheel_filename=$(basename "$wheel")
wheel_filename=$(basename "$wheel")
if [[ $wheel_filename == *linux*x86_64* ]]; then
mv "$wheel" wheels/bnb-linux-x86_64.whl
# Strip off the original version
elif [[ $wheel_filename == *linux*aarch64* ]]; then
rest=${wheel_filename#bitsandbytes-*-}
mv "$wheel" wheels/bnb-linux-aarch64.whl
new_name="bitsandbytes-${STABLE_PLACEHOLDER_VERSION}-${rest}"
elif [[ $wheel_filename == *macosx*x86_64* ]]; then
mv "$wheel" wheels/bnb-macos-x86_64.whl
echo "Renaming $wheel_filename → $new_name"
elif [[ $wheel_filename == *macosx*arm64* ]]; then
mv "$wheel" "wheels/${new_name}"
mv "$wheel" wheels/bnb-macos-arm64.whl
elif [[ $wheel_filename == *win*amd64* ]]; then
mv "$wheel" wheels/bnb-windows-x86_64.whl
else
echo "Unknown wheel format: $wheel_filename"
exit 1
fi
done
done
-
name
:
Inspect wheels directory after renaming files
-
name
:
Inspect wheels directory after renaming files
run
:
ls -alFR wheels/
run
:
ls -alFR wheels/
-
name
:
Create release and upload artifacts
-
name
:
Create release and upload artifacts
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment