Skip to content

Commit 2820cee

Browse files
try to fix license files not be accepting by twine
1 parent 1da3e51 commit 2820cee

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

.github/workflows/build.yml

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,19 +164,37 @@ jobs:
164164
${{ matrix.python-version }} -m auditwheel -v show dist/*.whl
165165
${{ matrix.python-version }} -m auditwheel repair dist/*.whl
166166
shell: bash
167+
- name: Rename wheel for testing
168+
run: |
169+
# Rename wheelhouse wheels to be maximally compatible for testing
170+
for wheel in wheelhouse/raylib*.whl; do
171+
if [ -f "$wheel" ]; then
172+
basename=$(basename "$wheel")
173+
# Extract package and version using regex
174+
if [[ $basename =~ ^([^-]+)-([^-]+.*)-[^-]+-[^-]+-[^-]+\.whl$ ]]; then
175+
package="${BASH_REMATCH[1]}"
176+
version="${BASH_REMATCH[2]}"
177+
new_name="${package}-${version}-py3-none-linux_x86_64.whl"
178+
echo "Renaming: $basename -> $new_name"
179+
cp "$wheel" "wheelhouse/$new_name"
180+
fi
181+
fi
182+
done
183+
shell: bash
167184
- name: Test
168185
run: |
169-
${{ matrix.python-version }} -m pip install --force-reinstall --no-deps --platform linux_x86_64 wheelhouse/*.whl
186+
${{ matrix.python-version }} -m pip install --no-deps wheelhouse/*-py3-none-linux_x86_64.whl
170187
cd /
171188
${{ matrix.python-version }} -c 'import pyray; pyray.init_window(100,100,"test")' >/tmp/output 2>&1 || true
172189
cat /tmp/output
173190
if grep -q "INFO: Initializing raylib" /tmp/output; then
174191
echo "Passed"
175-
exit 0
176192
else
177193
echo "Failed"
178194
exit 1
179195
fi
196+
# Clean up test wheels
197+
rm -f wheelhouse/*-py3-none-linux_x86_64.whl
180198
181199
182200
- name: Upload build Artifact wheel

0 commit comments

Comments
 (0)