From 5afd9b0ee5c94b878eb2c4e2988ab9e5d66e055c Mon Sep 17 00:00:00 2001 From: electronstudio Date: Sun, 3 Oct 2021 18:54:23 +0100 Subject: [PATCH] change mac build to expect raylib installed in /usr/local/lib --- .github/workflows/build.yml | 1 + BUILDING.rst | 3 ++- README.md | 3 ++- raylib/static/build.py | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0dfc969..b627a47 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -40,6 +40,7 @@ jobs: cd raylib-c cd src make -j2 + sudo cp libraylib.a /usr/local/lib/libraylib.a - name: Build raylib-python-cffi run: | python -m pip install --upgrade pip diff --git a/BUILDING.rst b/BUILDING.rst index 0c9ed2e..8d09717 100644 --- a/BUILDING.rst +++ b/BUILDING.rst @@ -200,12 +200,13 @@ Raylib. git clone --recurse-submodules https://github.com/electronstudio/raylib-python-cffi -Build Raylib from the raylib-c directory. +Build and install Raylib from the raylib-c directory. :: cd raylib-python-cffi/raylib-c/src make + sudo cp libraylib.a /usr/local/lib/libraylib.a cd ../.. diff --git a/README.md b/README.md index d868696..67f9fa8 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,8 @@ Problems may be caused by out of date pip: Some platforms that _should_ be available: Windows 10 x64, MacOS 10.15 x64, Linux Ubuntu1804 x64. -If yours isn't available then pip will attempt to build from source, so you will need to have Raylib development libs installed. +If yours isn't available then pip will attempt to build from source, in which case you will need to have Raylib development libs installed, e.g. +using homebrew, apt, etc. [If it doesn't work, build from source](BUILDING.md) diff --git a/raylib/static/build.py b/raylib/static/build.py index ccff335..a6137df 100644 --- a/raylib/static/build.py +++ b/raylib/static/build.py @@ -55,7 +55,7 @@ def build_mac(): """ #include "../../raylib/raylib.h" // the C header of the library, supplied by us here """, - extra_link_args=['raylib-c/src/libraylib.a', '-framework', 'OpenGL', '-framework', 'Cocoa', '-framework', 'IOKit', '-framework', 'CoreFoundation', '-framework', 'CoreVideo'], + extra_link_args=['-lraylib', '-framework', 'OpenGL', '-framework', 'Cocoa', '-framework', 'IOKit', '-framework', 'CoreFoundation', '-framework', 'CoreVideo'], ) if __name__ == "__main__":