Compare commits

...

2 Commits

Author SHA1 Message Date
Adeeb Shihadeh
9690fd5160 raylib: use stable ABI for CFFI extension (#37)
The CFFI extension was built with py_limited_api=False, producing
version-specific .so files (e.g., cpython-312 on Linux, cpython-314
on macOS). This caused import failures when the build Python version
didn't match the runtime version.

Switch to py_limited_api=True to produce _raylib_cffi.abi3.so which
works across Python 3.x versions.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 13:07:15 -08:00
Adeeb Shihadeh
c835b206c6 release: include compiled extensions (*.so) in shim package-data (#36)
The shim setup.py extracts .so files from the wheel, but the
generated pyproject.toml didn't include them in package-data, so
they were excluded when uv built a local wheel from the source.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 12:50:07 -08:00
3 changed files with 5 additions and 5 deletions

View File

@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "raylib"
version = "5.5.0.3"
version = "5.5.0.4"
description = "raylib + pyray Python bindings (commaai fork)"
requires-python = ">=3.8"
dependencies = ["cffi>=1.17.1"]

View File

@@ -93,7 +93,7 @@ def build_ffi():
'-framework', 'CoreVideo',
]
libraries = []
extra_compile_args = ["-Wno-error=incompatible-function-pointer-types", "-D_CFFI_NO_LIMITED_API"]
extra_compile_args = ["-Wno-error=incompatible-function-pointer-types"]
else:
print("BUILDING FOR LINUX")
extra_link_args = [
@@ -106,13 +106,13 @@ def build_ffi():
extra_link_args += ['-lGLESv2', '-lEGL', '-lgbm', '-ldrm']
else:
extra_link_args += ['-lX11']
extra_compile_args = ["-Wno-incompatible-pointer-types", "-D_CFFI_NO_LIMITED_API"]
extra_compile_args = ["-Wno-incompatible-pointer-types"]
libraries = []
print("extra_link_args: " + str(extra_link_args))
ffibuilder.set_source("raylib._raylib_cffi",
ffi_includes,
py_limited_api=False,
py_limited_api=True,
include_dirs=[RAYLIB_INCLUDE_PATH],
extra_link_args=extra_link_args,
extra_compile_args=extra_compile_args,

View File

@@ -107,7 +107,7 @@ for toml in sorted(pathlib.Path(".").glob("*/pyproject.toml")):
f"include = {json.dumps(find_include)}",
"",
"[tool.setuptools.package-data]",
f'{module} = ["{datadir}/**/*"]',
f'{module} = ["{datadir}/**/*", "*.so"]',
"",
"[tool.shim]",
f'repo_url = "{repo_url}"',