raylib: fix setup.py to also trigger offscreen variant build
setup.py had its own cache check that only looked for libraylib.a, skipping build.sh entirely when the cache had the desktop variant. Now also checks for libraylib_offscreen.a on x86_64. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "raylib"
|
name = "raylib"
|
||||||
version = "5.5.0.7"
|
version = "5.5.0.8"
|
||||||
description = "raylib + pyray Python bindings (commaai fork)"
|
description = "raylib + pyray Python bindings (commaai fork)"
|
||||||
requires-python = ">=3.8"
|
requires-python = ">=3.8"
|
||||||
dependencies = ["cffi>=1.17.1"]
|
dependencies = ["cffi>=1.17.1"]
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
__version__ = "5.5.0.7"
|
__version__ = "5.5.0.8"
|
||||||
@@ -18,9 +18,12 @@ class BuildRaylib(build_py):
|
|||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
pkg_dir = os.path.dirname(os.path.abspath(__file__))
|
pkg_dir = os.path.dirname(os.path.abspath(__file__))
|
||||||
marker = os.path.join(pkg_dir, "raylib", "install", "lib", "libraylib.a")
|
lib_dir = os.path.join(pkg_dir, "raylib", "install", "lib")
|
||||||
|
marker = os.path.join(lib_dir, "libraylib.a")
|
||||||
|
offscreen_marker = os.path.join(lib_dir, "libraylib_offscreen.a")
|
||||||
|
need_offscreen = platform.system() == "Linux" and platform.machine() == "x86_64"
|
||||||
|
|
||||||
if not os.path.exists(marker):
|
if not os.path.exists(marker) or (need_offscreen and not os.path.exists(offscreen_marker)):
|
||||||
build_script = os.path.join(pkg_dir, "build.sh")
|
build_script = os.path.join(pkg_dir, "build.sh")
|
||||||
subprocess.check_call(["bash", build_script], cwd=pkg_dir)
|
subprocess.check_call(["bash", build_script], cwd=pkg_dir)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user