diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index d984450..f8eccb9 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -19,7 +19,7 @@ jobs:
raylib-platform: ['Desktop', 'SDL']
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- - uses: actions/checkout@v2
+ - uses: actions/checkout@v4
with:
submodules: recursive
@@ -34,7 +34,7 @@ jobs:
sudo cmake --install .
- name: Setup Python
- uses: actions/setup-python@v2.2.2
+ uses: actions/setup-python@v5
with:
# Version range or exact version of a Python version to use, using SemVer's version range syntax.
python-version: ${{ matrix.python-version }}
@@ -106,7 +106,7 @@ jobs:
# MACOSX_DEPLOYMENT_TARGET: 11.0
# steps:
# # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
-# - uses: actions/checkout@v2
+# - uses: actions/checkout@v4
# with:
# submodules: recursive
#
@@ -121,7 +121,7 @@ jobs:
# sudo cmake --install .
#
# - name: Setup Python
-# uses: actions/setup-python@v2.2.2
+# uses: actions/setup-python@v5
# with:
# # Version range or exact version of a Python version to use, using SemVer's version range syntax.
# python-version: ${{ matrix.python-version }}
@@ -189,12 +189,12 @@ jobs:
raylib-platform: ['Desktop', 'SDL', 'DRM']
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- - uses: actions/checkout@v2
+ - uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup Python
- uses: actions/setup-python@v2.2.2
+ uses: actions/setup-python@v5
with:
# Version range or exact version of a Python version to use, using SemVer's version range syntax.
python-version: ${{ matrix.python-version }}
@@ -272,7 +272,7 @@ jobs:
python-version: [ '3.9', '3.10', '3.11', '3.12', '3.13', 'pypy-3.9', 'pypy-3.10' ]
raylib-platform: ['Desktop', 'SDL']
steps:
- - uses: actions/checkout@v2
+ - uses: actions/checkout@v4
with:
submodules: recursive
@@ -289,7 +289,7 @@ jobs:
run: echo SDL2_DIR=${{ runner.temp }}\SDL2\cmake >> $env:GITHUB_ENV
- name: Setup Python
- uses: actions/setup-python@v2.2.2
+ uses: actions/setup-python@v5
with:
# Version range or exact version of a Python version to use, using SemVer's version range syntax.
python-version: ${{ matrix.python-version }}
@@ -353,12 +353,12 @@ jobs:
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- - uses: actions/checkout@v2
+ - uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup Python
- uses: actions/setup-python@v2.2.2
+ uses: actions/setup-python@v5
with:
# Version range or exact version of a Python version to use, using SemVer's version range syntax.
python-version: '3.12'
@@ -400,12 +400,12 @@ jobs:
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- - uses: actions/checkout@v2
+ - uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup Python
- uses: actions/setup-python@v2.2.2
+ uses: actions/setup-python@v5
with:
# Version range or exact version of a Python version to use, using SemVer's version range syntax.
python-version: '3.12'
diff --git a/README.md b/README.md
index 06d372a..17a52d5 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,6 @@
-# Python Bindings for Raylib 5.0
+# Python Bindings for Raylib 5.5
+## Libraries: raymath, raygui, rlgl, physac and GLFW
+## Backends: Desktop, SDL, DRM, Web
Chatroom: [Discord](https://discord.gg/fKDwt85aX6) or [Matrix](https://matrix.to/#/#raylib-python-cffi:matrix.org)
@@ -8,23 +10,23 @@ original Raylib.
* Faster, fewer bugs and easier to maintain than ctypes.
* Commercial-friendly license.
* Docstrings and auto-completion.
-* **Now includes extra libraries: raymath, raygui, rlgl, physac and GLFW**
+
[Full documentation](http://electronstudio.github.io/raylib-python-cffi)
# Quickstart
-`pip3 install raylib`
-
- from pyray import *
- init_window(800, 450, "Hello")
- while not window_should_close():
- begin_drawing()
- clear_background(WHITE)
- draw_text("Hello world", 190, 200, 20, VIOLET)
- end_drawing()
- close_window()
-
+`pip3 install raylib==5.0.0.4`
+```python
+from pyray import *
+init_window(800, 450, "Hello")
+while not window_should_close():
+ begin_drawing()
+ clear_background(WHITE)
+ draw_text("Hello world", 190, 200, 20, VIOLET)
+ end_drawing()
+close_window()
+```
# Installation
@@ -35,13 +37,35 @@ First make sure you have the latest pip installed:
Then install
python3 -m pip install setuptools
- python3 -m pip install raylib
+ python3 -m pip install raylib==5.0.0.4
-On most platforms it should install a binary wheel (Windows 10 x64, MacOS 12 x64/arm64, Linux Ubuntu2004 x64/arm64).
-
-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.
+On most platforms it should install a binary wheel. 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.
+## Windows
+
+Binaries require x64 Windows 10 or newer. (For x86 or older Windows you will have to build from source.)
+
+Use an [official Windows Python release](https://www.python.org/downloads/windows/) rather than WSL, MSYS, etc.
+
+## MacOS
+
+Binaries require arm64 MacOS 13 or x64 MacOS 12 or newer.
+
+Older MacOS requires building from source but this is usually simple:
+
+ brew install pkg-config
+ brew install raylib
+ python3 -m pip install raylib==5.0.0.4
+
+## Linux
+
+Binaries require OS newer than Ubuntu 2020, x64 or arm64. Otherwise build from source.
+(Pip should attempt automatically but will need Raylib itself installed and also pkg-config.)
+
+The arm64 builds are built on Raspberry Pi arm64 Bullseye
+so may not work on other boards.
+
## Raspberry Pi
[Using on Rasperry Pi](RPI.rst)
@@ -54,12 +78,23 @@ There is now a separate dynamic version of this binding:
It works on some systems where the static version doesn't, [but be sure to read these caveats before using it](https://electronstudio.github.io/raylib-python-cffi/dynamic.html)
-## Beta testing
+## SDL backend
-If you find a bug, it may be fixed in the [latest dev release](https://github.com/electronstudio/raylib-python-cffi/releases).
-You can install an alpha or beta version by specifying the exact version number like this:
+This is not well tested but has better support for controllers:
- python3 -m pip install raylib==4.2.0.0.dev4
+ python3 -m pip uninstall raylib
+ python3 -m pip install raylib_sdl
+
+You can't have multiple backends installed at once.
+
+## DRM backend
+
+This uses the Linux framebuffer for devices that don't run X11/Wayland:
+
+ python3 -m pip uninstall raylib
+ python3 -m pip install raylib_drm
+
+You can't have multiple backends installed at once.
## Problems?
@@ -143,9 +178,9 @@ A related library (that is a work in progress!):
* Converting more examples from C to Python
* Testing on more platforms
-# License (updated)
+# License
-The bindings are now under the Eclipse Public License, so you are free to
+Eclipse Public License, so you are free to
statically link and use in non-free / proprietary / commercial projects!
# Performance
diff --git a/RPI.rst b/RPI.rst
index 56ff0a3..fa37601 100644
--- a/RPI.rst
+++ b/RPI.rst
@@ -12,7 +12,10 @@ We have published binary wheels compiled for 64-bit Raspberry OS Bullseye in X11
python -m pip install --break-system-packages raylib
-If it doesn't work, or you're not on Bullseye, or you're 32 bit, or if you want to use Raylib in ``PLATFORM_DRM`` mode, you will need to compile your own raylib. See below.
+Alternatively there is a DRM wheel called ``raylib_drm`` to use the framebuffer without X11. You can't have both wheels
+installed at once.
+
+If it doesn't work, or you're not on Bullseye, or you're 32 bit, you will need to compile your own raylib. See below.
For full instructions on this, see https://github.com/raysan5/raylib/wiki/Working-on-Raspberry-Pi . If you need help with this ask Raylib.
Option 2: Compile Raylib from source X11 mode
@@ -39,7 +42,7 @@ Then have pip compile and install the wheel:
::
python3 -m pip install --break-system-packages setuptools
- python3 -m pip install --no-cache-dir --no-binary raylib --upgrade --force-reinstall --break-system-packages raylib==5.0.0.3
+ python3 -m pip install --no-cache-dir --no-binary raylib --upgrade --force-reinstall --break-system-packages raylib==5.0.0.4
Option 3: Compile Raylib from source DRM mode
---------------------------------------------
@@ -82,7 +85,7 @@ Then have pip compile and install the wheel:
::
python3 -m pip install --break-system-packages setuptools
- python3 -m pip install --no-cache-dir --no-binary raylib --upgrade --force-reinstall --break-system-packages raylib==5.0.0.3
+ python3 -m pip install --no-cache-dir --no-binary raylib --upgrade --force-reinstall --break-system-packages raylib==5.0.0.4
diff --git a/create_stub_pyray.py b/create_stub_pyray.py
index c96d2c0..244270d 100644
--- a/create_stub_pyray.py
+++ b/create_stub_pyray.py
@@ -63,8 +63,6 @@ def ctype_to_python_type(t):
print("""from typing import Any
-def pointer(struct):
- ...
""")
# These words can be used for c arg names, but not in python
@@ -137,7 +135,7 @@ for struct in ffi.list_types()[0]:
# elif ffi.typeof(struct).kind == "enum":
# print(f"{struct}: int")
else:
- print("ERROR UNKNOWN TYPE", ffi.typeof(struct), file=sys.stderr)
+ print("WARNING: SKIPPING UNKNOWN TYPE", ffi.typeof(struct), file=sys.stderr)
print("""
LIGHTGRAY : Color
diff --git a/create_stub_static.py b/create_stub_static.py
index 7f4915e..1a61104 100644
--- a/create_stub_static.py
+++ b/create_stub_static.py
@@ -133,7 +133,7 @@ for struct in ffi.list_types()[0]:
elif ffi.typeof(struct).kind == "enum":
print(f"{struct}: int")
else:
- print("ERROR UNKNOWN TYPE", ffi.typeof(struct), file=sys.stderr)
+ print("WARNING: SKIPPING UNKNOWN TYPE", ffi.typeof(struct), file=sys.stderr)
print("""
diff --git a/docs/.buildinfo b/docs/.buildinfo
index 0e5c030..4214e1f 100644
--- a/docs/.buildinfo
+++ b/docs/.buildinfo
@@ -1,4 +1,4 @@
# Sphinx build info version 1
-# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
-config: 614f580883a5bffb7f1606004f7be223
+# This file records the configuration used when building these files. When it is not found, a full rebuild will be done.
+config: 6b88b88b20947586d6498748ffd23a92
tags: 645f666f9bcd5a90fca523b33c5a78b7
diff --git a/docs/BUILDING.html b/docs/BUILDING.html
index 149d339..6d7d4f8 100644
--- a/docs/BUILDING.html
+++ b/docs/BUILDING.html
@@ -1,3 +1,5 @@
+
+
On most platforms it should install a binary wheel (Windows 10 x64, MacOS 12 x64/arm64, Linux Ubuntu2004 x64/arm64).
-
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.
+
On most platforms it should install a binary wheel. 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.
Binaries require OS newer than Ubuntu 2020, x64 or arm64. Otherwise build from source.
+(Pip should attempt automatically but will need Raylib itself installed and also pkg-config.)
+
The arm64 builds are built on Raspberry Pi arm64 Bullseye
+so may not work on other boards.
If you find a bug, it may be fixed in the latest dev release.
-You can install an alpha or beta version by specifying the exact version number like this:
If it doesn’t work, or you’re not on Bullseye, or you’re 32 bit, or if you want to use Raylib in PLATFORM_DRM mode, you will need to compile your own raylib. See below.
+
Alternatively there is a DRM wheel called raylib_drm to use the framebuffer without X11. You can’t have both wheels
+installed at once.
+
If it doesn’t work, or you’re not on Bullseye, or you’re 32 bit, you will need to compile your own raylib. See below.
For full instructions on this, see https://github.com/raysan5/raylib/wiki/Working-on-Raspberry-Pi . If you need help with this ask Raylib.
@@ -124,7 +124,7 @@ For full instructions on this, see