Skip to content

Commit f182571

Browse files
release 5.5.0.3
1 parent 04365a0 commit f182571

File tree

14 files changed

+325
-175
lines changed

14 files changed

+325
-175
lines changed

AGENTS.md

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# CLAUDE.md
2+
3+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4+
5+
## Project Overview
6+
7+
This is raylib-python-cffi8, Python CFFI bindings for Raylib 5.5 game development library. It provides two main Python modules:
8+
- `raylib`: Direct C API bindings (exact copy of C functions)
9+
- `pyray`: More Pythonic API wrapper
10+
11+
## Key Architecture
12+
13+
- `/raylib/`: Core static CFFI bindings module with build system
14+
- `/pyray/`: Pythonic wrapper API module
15+
- `/dynamic/`: Dynamic binding version (separate package)
16+
- `/examples/`: Python example code organized by category (core, audio, textures, etc.)
17+
- `/raylib-c/`: Embedded Raylib C library source (git submodule)
18+
- `/raygui/`: Embedded raygui C library source (git submodule)
19+
- `/physac/`: Embedded physac physics library source
20+
- `/tests/`: Test scripts for both static and dynamic versions
21+
22+
## Build System
23+
24+
The project uses CFFI with setuptools. Main build entry point is `raylib/build.py` which:
25+
- Parses C headers from embedded libraries
26+
- Generates CFFI bindings
27+
- Handles platform-specific linking (Desktop/SDL/DRM backends)
28+
- Supports environment variable customization for build paths
29+
30+
## Development Commands
31+
32+
### Building from source
33+
```bash
34+
# Build Python library manually
35+
python3 raylib/build.py
36+
37+
# Build wheel distribution
38+
pip3 install wheel
39+
python3 setup.py bdist_wheel
40+
41+
# Install from wheel
42+
pip3 install dist/raylib*.whl
43+
```
44+
45+
### Testing
46+
```bash
47+
# Run main test suite
48+
cd tests && ./run_tests.sh
49+
50+
# Run dynamic version tests
51+
cd tests && ./run_tests_dynamic.sh
52+
53+
# Individual test files can be run with python3
54+
python3 tests/test_hello_world.py
55+
```
56+
57+
### Multiple platform builds
58+
```bash
59+
# Build for multiple Python versions (Linux)
60+
./raylib/build_multi_linux.sh
61+
62+
# Build for multiple Python versions (general)
63+
./raylib/build_multi.sh
64+
```
65+
66+
### Documentation
67+
```bash
68+
# Generate docs (uses Sphinx)
69+
./make_docs.sh
70+
```
71+
72+
## Environment Variables for Build Customization
73+
74+
- `RAYLIB_PLATFORM`: Desktop (default), SDL, DRM, PLATFORM_COMMA
75+
- `RAYLIB_LINK_ARGS`: Manual linker arguments instead of pkg-config
76+
- `RAYLIB_INCLUDE_PATH`: Custom path to raylib.h
77+
- `RAYGUI_INCLUDE_PATH`: Custom path to raygui.h
78+
- `GLFW_INCLUDE_PATH`: Custom path to glfw3.h
79+
- `PHYSAC_INCLUDE_PATH`: Custom path to physac.h
80+
81+
## Package Variants
82+
83+
The project can be built as different packages:
84+
- `raylib`: Standard desktop version
85+
- `raylib_sdl`: SDL backend version
86+
- `raylib_drm`: DRM framebuffer version
87+
- `raylib_dynamic`: Dynamic linking version (separate dynamic/ directory)
88+
89+
These are mutually exclusive - only one can be installed at a time.

BUILDING.rst

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Then ask Pip to build from source:
3333
Environment variables (new in 5.5.0.3)
3434
--------------------------------------
3535

36-
If plg-config doesn't work you can manually set these environment variables:
36+
If pkg-config doesn't work you can manually set these environment variables:
3737

3838
``RAYLIB_PLATFORM``: Any one of: ``Desktop``, ``SDL``, ``DRM``, ``PLATFORM_COMMA``
3939

@@ -55,6 +55,22 @@ e.g.: ``/usr/local/include``
5555
``LIBFFI_INCLUDE_PATH``:
5656
e.g.: ``/usr/local/include``
5757

58+
You can also override which package names pkg-config will search for:
59+
60+
``PKG_CONFIG_LIB_raylib``: the package to request from pkg-config for raylib include files, default ``raylib``
61+
62+
``PKG_CONFIG_LIB_raygui``: the package to request from pkg-config for raygui include files
63+
set to ``raygui``` if you have a separate raygui package, else unset for default ``raylib``
64+
65+
``PKG_CONFIG_LIB_physac``: the package to request from pkg-config for physac include files
66+
set to ``physac``` if you have a separate physac package, else unset for default ``raylib``
67+
68+
``PKG_CONFIG_LIB_glfw3``: the package to request from pkg-config for glfw3 include files
69+
set to ``glfw3`` if you have a separate glfw3 package, else unset for default ``raylib``
70+
71+
``PKG_CONFIG_LIB_libffi``: the package to request from pkg-config for libffi include files
72+
73+
5874
Or, Build from source manually
5975
------------------------------
6076

CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
AGENTS.md

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55

66
![PyPI - Downloads](https://img.shields.io/pypi/dm/raylib)
77

8+
[![PyPI Downloads](https://static.pepy.tech/personalized-badge/raylib?period=total&units=NONE&left_color=BLACK&right_color=GREEN&left_text=downloads)](https://pepy.tech/projects/raylib)
9+
810
HELP WANTED: [writing examples](https://github.com/electronstudio/raylib-python-cffi/issues/155)
911

1012
Features:
@@ -19,7 +21,7 @@ original Raylib.
1921

2022
# Quickstart
2123

22-
`pip3 install raylib==5.5.0.2 --break-system-packages`
24+
`pip3 install raylib==5.5.0.3 --break-system-packages`
2325
```python
2426
from pyray import *
2527
init_window(800, 450, "Hello")
@@ -34,7 +36,7 @@ close_window()
3436
# Links
3537

3638
* [Tutorial video](https://www.youtube.com/watch?v=UoAsDlUwjy0&lc=UgxCR-tvnQJITZr2IvN4AaABAg)
37-
* [Full documentation](http://electronstudio.github.io/raylib-python-cffi)
39+
* [Full documentation](https://electronstudio.github.io/raylib-python-cffi)
3840
* [Imgui integration](https://github.com/Scr44gr/raylib-imgui)
3941
* [Examples](https://github.com/electronstudio/raylib-python-cffi/tree/master/examples)
4042
* [Blep's examples](https://github.com/blep/pyray_examples)
@@ -58,7 +60,7 @@ Then make sure you have the latest pip installed:
5860
Then install
5961

6062
python3 -m pip install setuptools
61-
python3 -m pip install raylib==5.5.0.2
63+
python3 -m pip install raylib==5.5.0.3
6264

6365
On most platforms it should install a binary wheel. If yours isn't available then pip will attempt to build from
6466
source, in which case you will need to have Raylib development libs installed, e.g.
@@ -80,7 +82,7 @@ Older MacOS requires building from source but this is usually simple:
8082

8183
brew install pkg-config
8284
brew install raylib
83-
python3 -m pip install raylib==5.5.0.2
85+
python3 -m pip install raylib==5.5.0.3
8486

8587
(I do have binaries for arm64 MacOS 11, 12 and 13 but I have no way of testing they work, so post an issue
8688
if you want to test them.)

docs/.buildinfo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Sphinx build info version 1
22
# This file records the configuration used when building these files. When it is not found, a full rebuild will be done.
3-
config: 8201ba0ecd19ace25eb070033b3dde79
3+
config: ca7e3b5a5546ca800ac8de8e912e512b
44
tags: 645f666f9bcd5a90fca523b33c5a78b7

docs/BUILDING.html

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ <h2>Have Pip build from source<a class="headerlink" href="#have-pip-build-from-s
127127
</section>
128128
<section id="environment-variables-new-in-5-5-0-3">
129129
<h2>Environment variables (new in 5.5.0.3)<a class="headerlink" href="#environment-variables-new-in-5-5-0-3" title="Link to this heading"></a></h2>
130-
<p>If plg-config doesn’t work you can manually set these environment variables:</p>
130+
<p>If pkg-config doesn’t work you can manually set these environment variables:</p>
131131
<p><code class="docutils literal notranslate"><span class="pre">RAYLIB_PLATFORM</span></code>: Any one of: <code class="docutils literal notranslate"><span class="pre">Desktop</span></code>, <code class="docutils literal notranslate"><span class="pre">SDL</span></code>, <code class="docutils literal notranslate"><span class="pre">DRM</span></code>, <code class="docutils literal notranslate"><span class="pre">PLATFORM_COMMA</span></code></p>
132132
<p><code class="docutils literal notranslate"><span class="pre">RAYLIB_LINK_ARGS</span></code>: Arguments to pass to the linker rather than getting them from pkg-config.
133133
e.g.: <code class="docutils literal notranslate"><span class="pre">&quot;-L/usr/local/lib</span> <span class="pre">-lraylib&quot;</span></code></p>
@@ -141,6 +141,15 @@ <h2>Environment variables (new in 5.5.0.3)<a class="headerlink" href="#environme
141141
e.g.: <code class="docutils literal notranslate"><span class="pre">/usr/local/include</span></code></p>
142142
<p><code class="docutils literal notranslate"><span class="pre">LIBFFI_INCLUDE_PATH</span></code>:
143143
e.g.: <code class="docutils literal notranslate"><span class="pre">/usr/local/include</span></code></p>
144+
<p>You can also override which package names pkg-config will search for:</p>
145+
<p><code class="docutils literal notranslate"><span class="pre">PKG_CONFIG_LIB_raylib</span></code>: the package to request from pkg-config for raylib include files, default <code class="docutils literal notranslate"><span class="pre">raylib</span></code></p>
146+
<p><code class="docutils literal notranslate"><span class="pre">PKG_CONFIG_LIB_raygui</span></code>: the package to request from pkg-config for raygui include files
147+
set to <code class="docutils literal notranslate"><span class="pre">raygui`</span></code> if you have a separate raygui package, else unset for default <code class="docutils literal notranslate"><span class="pre">raylib</span></code></p>
148+
<p><code class="docutils literal notranslate"><span class="pre">PKG_CONFIG_LIB_physac</span></code>: the package to request from pkg-config for physac include files
149+
set to <code class="docutils literal notranslate"><span class="pre">physac`</span></code> if you have a separate physac package, else unset for default <code class="docutils literal notranslate"><span class="pre">raylib</span></code></p>
150+
<p><code class="docutils literal notranslate"><span class="pre">PKG_CONFIG_LIB_glfw3</span></code>: the package to request from pkg-config for glfw3 include files
151+
set to <code class="docutils literal notranslate"><span class="pre">glfw3</span></code> if you have a separate glfw3 package, else unset for default <code class="docutils literal notranslate"><span class="pre">raylib</span></code></p>
152+
<p><code class="docutils literal notranslate"><span class="pre">PKG_CONFIG_LIB_libffi</span></code>: the package to request from pkg-config for libffi include files</p>
144153
</section>
145154
<section id="or-build-from-source-manually">
146155
<h2>Or, Build from source manually<a class="headerlink" href="#or-build-from-source-manually" title="Link to this heading"></a></h2>

docs/README.html

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ <h2>Backends: Desktop, SDL, DRM, Web<a class="headerlink" href="#backends-deskto
125125
<section id="platforms-windows-mac-linux-raspberry-pi-web">
126126
<h2>Platforms: Windows, Mac, Linux, Raspberry Pi, Web<a class="headerlink" href="#platforms-windows-mac-linux-raspberry-pi-web" title="Link to this heading"></a></h2>
127127
<p><img alt="PyPI - Downloads" src="https://img.shields.io/pypi/dm/raylib" /></p>
128+
<p><a class="reference external" href="https://pepy.tech/projects/raylib"><img alt="PyPI Downloads" src="https://static.pepy.tech/personalized-badge/raylib?period=total&amp;units=NONE&amp;left_color=BLACK&amp;right_color=GREEN&amp;left_text=downloads" /></a></p>
128129
<p>HELP WANTED: <a class="reference external" href="https://github.com/electronstudio/raylib-python-cffi/issues/155">writing examples</a></p>
129130
<p>Features:</p>
130131
<ul class="simple">
@@ -140,7 +141,7 @@ <h2>Platforms: Windows, Mac, Linux, Raspberry Pi, Web<a class="headerlink" href=
140141
</section>
141142
<section id="quickstart">
142143
<h1>Quickstart<a class="headerlink" href="#quickstart" title="Link to this heading"></a></h1>
143-
<p><code class="docutils literal notranslate"><span class="pre">pip3</span> <span class="pre">install</span> <span class="pre">raylib==5.5.0.2</span> <span class="pre">--break-system-packages</span></code></p>
144+
<p><code class="docutils literal notranslate"><span class="pre">pip3</span> <span class="pre">install</span> <span class="pre">raylib==5.5.0.3</span> <span class="pre">--break-system-packages</span></code></p>
144145
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span><span class="w"> </span><span class="nn">pyray</span><span class="w"> </span><span class="kn">import</span> <span class="o">*</span>
145146
<span class="n">init_window</span><span class="p">(</span><span class="mi">800</span><span class="p">,</span> <span class="mi">450</span><span class="p">,</span> <span class="s2">&quot;Hello&quot;</span><span class="p">)</span>
146147
<span class="k">while</span> <span class="ow">not</span> <span class="n">window_should_close</span><span class="p">():</span>
@@ -156,7 +157,7 @@ <h1>Quickstart<a class="headerlink" href="#quickstart" title="Link to this headi
156157
<h1>Links<a class="headerlink" href="#links" title="Link to this heading"></a></h1>
157158
<ul class="simple">
158159
<li><p><a class="reference external" href="https://www.youtube.com/watch?v=UoAsDlUwjy0&amp;amp;lc=UgxCR-tvnQJITZr2IvN4AaABAg">Tutorial video</a></p></li>
159-
<li><p><a class="reference external" href="http://electronstudio.github.io/raylib-python-cffi">Full documentation</a></p></li>
160+
<li><p><a class="reference external" href="https://electronstudio.github.io/raylib-python-cffi">Full documentation</a></p></li>
160161
<li><p><a class="reference external" href="https://github.com/Scr44gr/raylib-imgui">Imgui integration</a></p></li>
161162
<li><p><a class="reference external" href="https://github.com/electronstudio/raylib-python-cffi/tree/master/examples">Examples</a></p></li>
162163
<li><p><a class="reference external" href="https://github.com/blep/pyray_examples">Blep’s examples</a></p></li>
@@ -180,7 +181,7 @@ <h1>Installation<a class="headerlink" href="#installation" title="Link to this h
180181
</div>
181182
<p>Then install</p>
182183
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>python3 -m pip install setuptools
183-
python3 -m pip install raylib==5.5.0.2
184+
python3 -m pip install raylib==5.5.0.3
184185
</pre></div>
185186
</div>
186187
<p>On most platforms it should install a binary wheel. If yours isn’t available then pip will attempt to build from
@@ -201,7 +202,7 @@ <h2>MacOS<a class="headerlink" href="#macos" title="Link to this heading"></a
201202
<p>Older MacOS requires building from source but this is usually simple:</p>
202203
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>brew install pkg-config
203204
brew install raylib
204-
python3 -m pip install raylib==5.5.0.2
205+
python3 -m pip install raylib==5.5.0.3
205206
</pre></div>
206207
</div>
207208
<p>(I do have binaries for arm64 MacOS 11, 12 and 13 but I have no way of testing they work, so post an issue

docs/_sources/BUILDING.rst.txt

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Then ask Pip to build from source:
3333
Environment variables (new in 5.5.0.3)
3434
--------------------------------------
3535

36-
If plg-config doesn't work you can manually set these environment variables:
36+
If pkg-config doesn't work you can manually set these environment variables:
3737

3838
``RAYLIB_PLATFORM``: Any one of: ``Desktop``, ``SDL``, ``DRM``, ``PLATFORM_COMMA``
3939

@@ -55,6 +55,22 @@ e.g.: ``/usr/local/include``
5555
``LIBFFI_INCLUDE_PATH``:
5656
e.g.: ``/usr/local/include``
5757

58+
You can also override which package names pkg-config will search for:
59+
60+
``PKG_CONFIG_LIB_raylib``: the package to request from pkg-config for raylib include files, default ``raylib``
61+
62+
``PKG_CONFIG_LIB_raygui``: the package to request from pkg-config for raygui include files
63+
set to ``raygui``` if you have a separate raygui package, else unset for default ``raylib``
64+
65+
``PKG_CONFIG_LIB_physac``: the package to request from pkg-config for physac include files
66+
set to ``physac``` if you have a separate physac package, else unset for default ``raylib``
67+
68+
``PKG_CONFIG_LIB_glfw3``: the package to request from pkg-config for glfw3 include files
69+
set to ``glfw3`` if you have a separate glfw3 package, else unset for default ``raylib``
70+
71+
``PKG_CONFIG_LIB_libffi``: the package to request from pkg-config for libffi include files
72+
73+
5874
Or, Build from source manually
5975
------------------------------
6076

docs/_sources/README.md.txt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55

66
![PyPI - Downloads](https://img.shields.io/pypi/dm/raylib)
77

8+
[![PyPI Downloads](https://static.pepy.tech/personalized-badge/raylib?period=total&units=NONE&left_color=BLACK&right_color=GREEN&left_text=downloads)](https://pepy.tech/projects/raylib)
9+
810
HELP WANTED: [writing examples](https://github.com/electronstudio/raylib-python-cffi/issues/155)
911

1012
Features:
@@ -19,7 +21,7 @@ original Raylib.
1921

2022
# Quickstart
2123

22-
`pip3 install raylib==5.5.0.2 --break-system-packages`
24+
`pip3 install raylib==5.5.0.3 --break-system-packages`
2325
```python
2426
from pyray import *
2527
init_window(800, 450, "Hello")
@@ -34,7 +36,7 @@ close_window()
3436
# Links
3537

3638
* [Tutorial video](https://www.youtube.com/watch?v=UoAsDlUwjy0&lc=UgxCR-tvnQJITZr2IvN4AaABAg)
37-
* [Full documentation](http://electronstudio.github.io/raylib-python-cffi)
39+
* [Full documentation](https://electronstudio.github.io/raylib-python-cffi)
3840
* [Imgui integration](https://github.com/Scr44gr/raylib-imgui)
3941
* [Examples](https://github.com/electronstudio/raylib-python-cffi/tree/master/examples)
4042
* [Blep's examples](https://github.com/blep/pyray_examples)
@@ -58,7 +60,7 @@ Then make sure you have the latest pip installed:
5860
Then install
5961

6062
python3 -m pip install setuptools
61-
python3 -m pip install raylib==5.5.0.2
63+
python3 -m pip install raylib==5.5.0.3
6264

6365
On most platforms it should install a binary wheel. If yours isn't available then pip will attempt to build from
6466
source, in which case you will need to have Raylib development libs installed, e.g.
@@ -80,7 +82,7 @@ Older MacOS requires building from source but this is usually simple:
8082

8183
brew install pkg-config
8284
brew install raylib
83-
python3 -m pip install raylib==5.5.0.2
85+
python3 -m pip install raylib==5.5.0.3
8486

8587
(I do have binaries for arm64 MacOS 11, 12 and 13 but I have no way of testing they work, so post an issue
8688
if you want to test them.)

0 commit comments

Comments
 (0)