Compare commits
2 Commits
raylib/v5.
...
raylib/v5.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
21bb9ab18e | ||
|
|
2341b89849 |
@@ -6,10 +6,17 @@ cd "$DIR"
|
||||
|
||||
INSTALL_DIR="$DIR/raylib/install"
|
||||
|
||||
# Idempotent: skip if already built
|
||||
# Idempotent: skip if already fully built
|
||||
# On x86_64 Linux, also require the offscreen variant
|
||||
NEED_OFFSCREEN=0
|
||||
if [[ "$(uname)" == "Linux" && "$(uname -m)" == "x86_64" ]]; then
|
||||
NEED_OFFSCREEN=1
|
||||
fi
|
||||
if [ -f "$INSTALL_DIR/lib/libraylib.a" ]; then
|
||||
echo "raylib already present, skipping build."
|
||||
exit 0
|
||||
if [ "$NEED_OFFSCREEN" -eq 0 ] || [ -f "$INSTALL_DIR/lib/libraylib_offscreen.a" ]; then
|
||||
echo "raylib already present, skipping build."
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
|
||||
NJOBS="$(nproc 2>/dev/null || sysctl -n hw.ncpu 2>/dev/null || echo 2)"
|
||||
|
||||
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
||||
|
||||
[project]
|
||||
name = "raylib"
|
||||
version = "5.5.0.6"
|
||||
version = "5.5.0.8"
|
||||
description = "raylib + pyray Python bindings (commaai fork)"
|
||||
requires-python = ">=3.8"
|
||||
dependencies = ["cffi>=1.17.1"]
|
||||
|
||||
@@ -1 +1 @@
|
||||
__version__ = "5.5.0.6"
|
||||
__version__ = "5.5.0.8"
|
||||
@@ -18,9 +18,12 @@ class BuildRaylib(build_py):
|
||||
|
||||
def run(self):
|
||||
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")
|
||||
subprocess.check_call(["bash", build_script], cwd=pkg_dir)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user