Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
78c75f6
Fix PEP 517 build by adding cffi to build requirements
electronstudio Aug 27, 2025
9fb7b1c
Remove deprecated setup_requires to enforce PEP 517 builds
electronstudio Aug 27, 2025
c0cc2e5
try to fix license files not be accepting by twine
electronstudio Aug 27, 2025
c1c2114
try to fix license files not be accepting by twine
electronstudio Aug 27, 2025
ea40dd1
try to fix license files not be accepting by twine
electronstudio Aug 27, 2025
4065712
try to fix license files not be accepting by twine
electronstudio Aug 27, 2025
8877301
try to fix license files not be accepting by twine
electronstudio Aug 27, 2025
bc48188
try to fix license files not be accepting by twine
electronstudio Aug 27, 2025
6268a17
try to fix license files not be accepting by twine
electronstudio Aug 27, 2025
bbd8bd4
try to fix license files not be accepting by twine
electronstudio Aug 27, 2025
40bb814
try to fix license files not be accepting by twine
electronstudio Aug 27, 2025
ce690ae
try to fix license files not be accepting by twine
electronstudio Aug 27, 2025
1da3e51
try to fix license files not be accepting by twine
electronstudio Aug 27, 2025
2820cee
try to fix license files not be accepting by twine
electronstudio Aug 27, 2025
5436c02
try to fix license files not be accepting by twine
electronstudio Aug 27, 2025
04f3a52
try to fix license files not be accepting by twine
electronstudio Aug 27, 2025
9033ebd
try to fix license files not be accepting by twine
electronstudio Aug 27, 2025
c49e83e
try to fix license files not be accepting by twine
electronstudio Aug 27, 2025
57fd66e
try to fix license files not be accepting by twine
electronstudio Aug 27, 2025
c194be1
try to fix license files not be accepting by twine
electronstudio Aug 28, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 42 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,20 @@ jobs:
pip3 install --upgrade "cffi>=1.17.1"
pip3 install --upgrade wheel
pip3 install --upgrade setuptools
python setup.py bdist_wheel --plat-name macosx_10_13_x86_64
python -m pip install --upgrade build
python -m build --wheel

- name: Rename wheels from universal2 to x86_64
run: |
# Rename universal2 wheels to x86_64 since they aren't truly universal
for wheel in dist/*universal2.whl; do
if [ -f "$wheel" ]; then
new_wheel=$(echo "$wheel" | sed 's/universal2/x86_64/')
echo "Renaming: $(basename "$wheel") -> $(basename "$new_wheel")"
mv "$wheel" "$new_wheel"
fi
done
shell: bash

- name: Test
run: |
Expand Down Expand Up @@ -155,17 +168,39 @@ jobs:
${{ matrix.python-version }} -m pip install --upgrade "cffi>=1.17.1"
${{ matrix.python-version }} -m pip install --upgrade wheel
${{ matrix.python-version }} -m pip install --upgrade setuptools
${{ matrix.python-version }} setup.py bdist_wheel --plat-name manylinux2014_x86_64
${{ matrix.python-version }} -m pip install --upgrade build
${{ matrix.python-version }} -m build --wheel
python3.13 -m pip install --upgrade auditwheel
python3.13 -m pip install --upgrade patchelf
python3.13 -m auditwheel repair dist/*.whl
shell: bash
- name: Rename wheel for testing
run: |
# Rename wheelhouse wheels to be maximally compatible for testing
for wheel in wheelhouse/raylib*.whl; do
if [ -f "$wheel" ]; then
basename=$(basename "$wheel")
# Extract package and version using regex
if [[ $basename =~ ^([^-]+)-([^-]+.*)-[^-]+-[^-]+-[^-]+\.whl$ ]]; then
package="${BASH_REMATCH[1]}"
version="${BASH_REMATCH[2]}"
new_name="${package}-${version}-py3-none-linux_x86_64.whl"
echo "Renaming: $basename -> $new_name"
cp "$wheel" "wheelhouse/$new_name"
fi
fi
done
shell: bash
- name: Test
run: |
${{ matrix.python-version }} -m pip install dist/*.whl
${{ matrix.python-version }} -m pip install --no-deps wheelhouse/*-py3-none-linux_x86_64.whl
# Clean up test wheels
rm -f wheelhouse/*-py3-none-linux_x86_64.whl
cd /
${{ matrix.python-version }} -c 'import pyray; pyray.init_window(100,100,"test")' >/tmp/output 2>&1 || true
cat /tmp/output
if grep -q "INFO: Initializing raylib" /tmp/output; then
echo "Passed"
exit 0
else
echo "Failed"
exit 1
Expand All @@ -176,7 +211,7 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: wheel-linux-${{ matrix.raylib-platform }}-${{ matrix.python-version }}
path: dist/*
path: wheelhouse/*


build-windows:
Expand Down Expand Up @@ -242,11 +277,12 @@ jobs:
pip3 install --upgrade "cffi>=1.17.1"
pip3 install --upgrade wheel
pip3 install --upgrade setuptools
pip3 install --upgrade build
del raylib\dynamic\*.so* >nul 2>&1
del raylib\dynamic\*.dll >nul 2>&1
del raylib\dynamic\*.dylib >nul 2>&1
del raylib\dynamic\32bit\* >nul 2>&1
python setup.py bdist_wheel
python -m build --wheel
shell: cmd

- name: Test
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[build-system]
requires = ["setuptools"]
requires = ["setuptools", "cffi>=1.17.1"]
build-backend = "setuptools.build_meta"
3 changes: 0 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ def has_ext_modules(foo):
url="https://github.com/electronstudio/raylib-python-cffi",
author="Electron Studio",
author_email="github@electronstudio.co.uk",
license="EPL-2.0",
license_files = ['LICENSE'],
classifiers=[
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.13",
Expand All @@ -44,7 +42,6 @@ def has_ext_modules(foo):
],
packages=["raylib", "pyray"],
include_package_data=True,
setup_requires=["cffi>=1.17.1"],
install_requires=["cffi>=1.17.1"],
distclass=BinaryDistribution,
cffi_modules=["raylib/build.py:ffibuilder"]
Expand Down