raylib 5.0.0.4__tar.gz → 5.5.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of raylib might be problematic. Click here for more details.
- {raylib-5.0.0.4 → raylib-5.5.0.0}/MANIFEST.in +3 -1
- {raylib-5.0.0.4/raylib.egg-info → raylib-5.5.0.0}/PKG-INFO +74 -30
- {raylib-5.0.0.4 → raylib-5.5.0.0}/README.md +73 -29
- {raylib-5.0.0.4 → raylib-5.5.0.0}/pyray/__init__.py +3 -4
- {raylib-5.0.0.4 → raylib-5.5.0.0}/pyray/__init__.pyi +3956 -3613
- raylib-5.5.0.0/pyray/py.typed +0 -0
- {raylib-5.0.0.4 → raylib-5.5.0.0}/raylib/__init__.pyi +1331 -844
- {raylib-5.0.0.4 → raylib-5.5.0.0}/raylib/build.py +46 -14
- {raylib-5.0.0.4 → raylib-5.5.0.0}/raylib/defines.py +27 -11
- {raylib-5.0.0.4 → raylib-5.5.0.0}/raylib/enums.py +16 -11
- {raylib-5.0.0.4 → raylib-5.5.0.0}/raylib/glfw3.h.modified +226 -110
- raylib-5.5.0.0/raylib/py.typed +0 -0
- {raylib-5.0.0.4 → raylib-5.5.0.0}/raylib/raygui.h.modified +53 -31
- {raylib-5.0.0.4 → raylib-5.5.0.0}/raylib/raylib.h.modified +133 -94
- {raylib-5.0.0.4 → raylib-5.5.0.0}/raylib/raymath.h.modified +40 -10
- {raylib-5.0.0.4 → raylib-5.5.0.0}/raylib/rlgl.h.modified +55 -38
- raylib-5.5.0.0/raylib/version.py +1 -0
- {raylib-5.0.0.4 → raylib-5.5.0.0/raylib.egg-info}/PKG-INFO +74 -30
- {raylib-5.0.0.4 → raylib-5.5.0.0}/raylib.egg-info/SOURCES.txt +2 -0
- {raylib-5.0.0.4 → raylib-5.5.0.0}/setup.py +9 -2
- raylib-5.5.0.0/version.py +1 -0
- raylib-5.0.0.4/raylib/version.py +0 -1
- raylib-5.0.0.4/version.py +0 -1
- {raylib-5.0.0.4 → raylib-5.5.0.0}/LICENSE +0 -0
- {raylib-5.0.0.4 → raylib-5.5.0.0}/pyproject.toml +0 -0
- {raylib-5.0.0.4 → raylib-5.5.0.0}/raylib/__init__.py +0 -0
- {raylib-5.0.0.4 → raylib-5.5.0.0}/raylib/colors.py +0 -0
- {raylib-5.0.0.4 → raylib-5.5.0.0}/raylib/physac.h.modified +0 -0
- {raylib-5.0.0.4 → raylib-5.5.0.0}/raylib.egg-info/dependency_links.txt +0 -0
- {raylib-5.0.0.4 → raylib-5.5.0.0}/raylib.egg-info/requires.txt +0 -0
- {raylib-5.0.0.4 → raylib-5.5.0.0}/raylib.egg-info/top_level.txt +0 -0
- {raylib-5.0.0.4 → raylib-5.5.0.0}/setup.cfg +0 -0
|
@@ -2,6 +2,7 @@ include raylib/*.so
|
|
|
2
2
|
include raylib/*.pyi
|
|
3
3
|
include pyray/*.pyi
|
|
4
4
|
include raylib/*.pyd
|
|
5
|
+
include raylib/*.dll
|
|
5
6
|
exclude raylib/*.a
|
|
6
7
|
include raylib/*.h
|
|
7
8
|
include raylib/*.h.modified
|
|
@@ -9,6 +10,7 @@ exclude raylib/*.c
|
|
|
9
10
|
exclude raylib/*.o
|
|
10
11
|
include version.py
|
|
11
12
|
exclude tests/*
|
|
12
|
-
|
|
13
|
+
include raylib/py.typed
|
|
14
|
+
include pyray/py.typed
|
|
13
15
|
|
|
14
16
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: raylib
|
|
3
|
-
Version: 5.0.0
|
|
3
|
+
Version: 5.5.0.0
|
|
4
4
|
Summary: Python CFFI bindings for Raylib
|
|
5
5
|
Home-page: https://github.com/electronstudio/raylib-python-cffi
|
|
6
6
|
Author: Electron Studio
|
|
@@ -19,9 +19,11 @@ Description-Content-Type: text/markdown
|
|
|
19
19
|
License-File: LICENSE
|
|
20
20
|
Requires-Dist: cffi>=1.17.1
|
|
21
21
|
|
|
22
|
-
# Python Bindings for Raylib 5.
|
|
22
|
+
# Python Bindings for Raylib 5.5
|
|
23
|
+
## Libraries: raymath, raygui, rlgl, physac and GLFW
|
|
24
|
+
## Backends: Desktop, SDL, DRM, Web
|
|
23
25
|
|
|
24
|
-
Chatroom: [Discord](https://discord.gg/fKDwt85aX6)
|
|
26
|
+
Chatroom: [Discord](https://discord.gg/fKDwt85aX6)
|
|
25
27
|
|
|
26
28
|
New CFFI API static bindings.
|
|
27
29
|
* Automatically generated to be as close as possible to
|
|
@@ -29,23 +31,23 @@ original Raylib.
|
|
|
29
31
|
* Faster, fewer bugs and easier to maintain than ctypes.
|
|
30
32
|
* Commercial-friendly license.
|
|
31
33
|
* Docstrings and auto-completion.
|
|
32
|
-
|
|
34
|
+
|
|
33
35
|
|
|
34
36
|
[Full documentation](http://electronstudio.github.io/raylib-python-cffi)
|
|
35
37
|
|
|
36
38
|
# Quickstart
|
|
37
39
|
|
|
38
|
-
`pip3 install raylib`
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
40
|
+
`pip3 install raylib==5.0.0.4`
|
|
41
|
+
```python
|
|
42
|
+
from pyray import *
|
|
43
|
+
init_window(800, 450, "Hello")
|
|
44
|
+
while not window_should_close():
|
|
45
|
+
begin_drawing()
|
|
46
|
+
clear_background(WHITE)
|
|
47
|
+
draw_text("Hello world", 190, 200, 20, VIOLET)
|
|
48
|
+
end_drawing()
|
|
49
|
+
close_window()
|
|
50
|
+
```
|
|
49
51
|
|
|
50
52
|
# Installation
|
|
51
53
|
|
|
@@ -56,13 +58,41 @@ First make sure you have the latest pip installed:
|
|
|
56
58
|
Then install
|
|
57
59
|
|
|
58
60
|
python3 -m pip install setuptools
|
|
59
|
-
python3 -m pip install raylib
|
|
60
|
-
|
|
61
|
-
On most platforms it should install a binary wheel (Windows 10 x64, MacOS 12 x64/arm64, Linux Ubuntu2004 x64/arm64).
|
|
61
|
+
python3 -m pip install raylib==5.0.0.4
|
|
62
62
|
|
|
63
|
-
If yours isn't available then pip will attempt to build from
|
|
63
|
+
On most platforms it should install a binary wheel. If yours isn't available then pip will attempt to build from
|
|
64
|
+
source, in which case you will need to have Raylib development libs installed, e.g.
|
|
64
65
|
using homebrew, apt, etc.
|
|
65
66
|
|
|
67
|
+
## Windows
|
|
68
|
+
|
|
69
|
+
Binaries require x64 Windows 10 or newer. (For x86 or older Windows you will have to build from source.)
|
|
70
|
+
|
|
71
|
+
Use an [official Windows Python release](https://www.python.org/downloads/windows/) rather than WSL, MSYS, etc.
|
|
72
|
+
|
|
73
|
+
## MacOS
|
|
74
|
+
|
|
75
|
+
Binaries require:
|
|
76
|
+
* arm64 MacOS 14
|
|
77
|
+
* x64 MacOS 10.13, or newer.
|
|
78
|
+
|
|
79
|
+
Older MacOS requires building from source but this is usually simple:
|
|
80
|
+
|
|
81
|
+
brew install pkg-config
|
|
82
|
+
brew install raylib
|
|
83
|
+
python3 -m pip install raylib==5.0.0.4
|
|
84
|
+
|
|
85
|
+
(I do have binaries for arm64 MacOS 11, 12 and 13 but I have no way of testing they work, so post an issue
|
|
86
|
+
if you want to test them.)
|
|
87
|
+
|
|
88
|
+
## Linux
|
|
89
|
+
|
|
90
|
+
Binaries require OS newer than Ubuntu 2020, x64 or arm64. Otherwise build from source.
|
|
91
|
+
(Pip should attempt automatically but will need Raylib itself installed and also pkg-config.)
|
|
92
|
+
|
|
93
|
+
The arm64 binaries are built on Raspberry Pi arm64 Bullseye with OpenGL 2.0
|
|
94
|
+
so may not work on other boards.
|
|
95
|
+
|
|
66
96
|
## Raspberry Pi
|
|
67
97
|
|
|
68
98
|
[Using on Rasperry Pi](RPI.rst)
|
|
@@ -71,38 +101,52 @@ using homebrew, apt, etc.
|
|
|
71
101
|
|
|
72
102
|
There is now a separate dynamic version of this binding:
|
|
73
103
|
|
|
104
|
+
python3 -m pip uninstall raylib
|
|
74
105
|
python3 -m pip install raylib_dynamic
|
|
75
106
|
|
|
76
107
|
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)
|
|
77
108
|
|
|
78
|
-
##
|
|
109
|
+
## SDL backend
|
|
110
|
+
|
|
111
|
+
This is not well tested but has better support for controllers:
|
|
112
|
+
|
|
113
|
+
python3 -m pip uninstall raylib
|
|
114
|
+
python3 -m pip install raylib_sdl
|
|
115
|
+
|
|
116
|
+
You can't have multiple raylib packages installed at once.
|
|
117
|
+
|
|
118
|
+
## DRM backend
|
|
119
|
+
|
|
120
|
+
This uses the Linux framebuffer for devices that don't run X11/Wayland:
|
|
79
121
|
|
|
80
|
-
|
|
81
|
-
|
|
122
|
+
python3 -m pip uninstall raylib
|
|
123
|
+
python3 -m pip install raylib_drm
|
|
82
124
|
|
|
83
|
-
|
|
125
|
+
You can't have multiple raylib packages installed at once.
|
|
84
126
|
|
|
85
127
|
## Problems?
|
|
86
128
|
|
|
87
129
|
If it doesn't work, [try to build manually.](BUILDING.rst). If that works then [submit an issue](https://github.com/electronstudio/raylib-python-cffi/issues)
|
|
88
130
|
to let us know what you did.
|
|
89
131
|
|
|
90
|
-
If you need help you can try asking
|
|
132
|
+
If you need help you can try asking on [our discord](https://discord.gg/fKDwt85aX6). There is also a large [Raylib discord](https://discord.gg/raylib)
|
|
133
|
+
for issues that are not Python-specific.
|
|
91
134
|
|
|
92
135
|
If it still doesn't work, [submit an issue](https://github.com/electronstudio/raylib-python-cffi/issues).
|
|
93
136
|
|
|
94
137
|
|
|
95
138
|
# How to use
|
|
96
139
|
|
|
97
|
-
There are two
|
|
140
|
+
There are two modules in the raylib package, `raylib` and `pyray`. (There is no separate package for
|
|
141
|
+
pyray). You can use either or both:
|
|
98
142
|
|
|
99
143
|
### If you are familiar with C coding and the Raylib C library and you want to use an exact copy of the C API
|
|
100
144
|
|
|
101
|
-
Use [the
|
|
145
|
+
Use [the raylib module](https://electronstudio.github.io/raylib-python-cffi/raylib.html).
|
|
102
146
|
|
|
103
|
-
### If you prefer a
|
|
147
|
+
### If you prefer a more Pythonistic API
|
|
104
148
|
|
|
105
|
-
Use [the
|
|
149
|
+
Use [the pyray module](https://electronstudio.github.io/raylib-python-cffi/pyray.html).
|
|
106
150
|
|
|
107
151
|
# Running in a web browser
|
|
108
152
|
|
|
@@ -164,9 +208,9 @@ A related library (that is a work in progress!):
|
|
|
164
208
|
* Converting more examples from C to Python
|
|
165
209
|
* Testing on more platforms
|
|
166
210
|
|
|
167
|
-
# License
|
|
211
|
+
# License
|
|
168
212
|
|
|
169
|
-
|
|
213
|
+
Eclipse Public License, so you are free to
|
|
170
214
|
statically link and use in non-free / proprietary / commercial projects!
|
|
171
215
|
|
|
172
216
|
# Performance
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
# Python Bindings for Raylib 5.
|
|
1
|
+
# Python Bindings for Raylib 5.5
|
|
2
|
+
## Libraries: raymath, raygui, rlgl, physac and GLFW
|
|
3
|
+
## Backends: Desktop, SDL, DRM, Web
|
|
2
4
|
|
|
3
|
-
Chatroom: [Discord](https://discord.gg/fKDwt85aX6)
|
|
5
|
+
Chatroom: [Discord](https://discord.gg/fKDwt85aX6)
|
|
4
6
|
|
|
5
7
|
New CFFI API static bindings.
|
|
6
8
|
* Automatically generated to be as close as possible to
|
|
@@ -8,23 +10,23 @@ original Raylib.
|
|
|
8
10
|
* Faster, fewer bugs and easier to maintain than ctypes.
|
|
9
11
|
* Commercial-friendly license.
|
|
10
12
|
* Docstrings and auto-completion.
|
|
11
|
-
|
|
13
|
+
|
|
12
14
|
|
|
13
15
|
[Full documentation](http://electronstudio.github.io/raylib-python-cffi)
|
|
14
16
|
|
|
15
17
|
# Quickstart
|
|
16
18
|
|
|
17
|
-
`pip3 install raylib`
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
19
|
+
`pip3 install raylib==5.0.0.4`
|
|
20
|
+
```python
|
|
21
|
+
from pyray import *
|
|
22
|
+
init_window(800, 450, "Hello")
|
|
23
|
+
while not window_should_close():
|
|
24
|
+
begin_drawing()
|
|
25
|
+
clear_background(WHITE)
|
|
26
|
+
draw_text("Hello world", 190, 200, 20, VIOLET)
|
|
27
|
+
end_drawing()
|
|
28
|
+
close_window()
|
|
29
|
+
```
|
|
28
30
|
|
|
29
31
|
# Installation
|
|
30
32
|
|
|
@@ -35,13 +37,41 @@ First make sure you have the latest pip installed:
|
|
|
35
37
|
Then install
|
|
36
38
|
|
|
37
39
|
python3 -m pip install setuptools
|
|
38
|
-
python3 -m pip install raylib
|
|
39
|
-
|
|
40
|
-
On most platforms it should install a binary wheel (Windows 10 x64, MacOS 12 x64/arm64, Linux Ubuntu2004 x64/arm64).
|
|
40
|
+
python3 -m pip install raylib==5.0.0.4
|
|
41
41
|
|
|
42
|
-
If yours isn't available then pip will attempt to build from
|
|
42
|
+
On most platforms it should install a binary wheel. If yours isn't available then pip will attempt to build from
|
|
43
|
+
source, in which case you will need to have Raylib development libs installed, e.g.
|
|
43
44
|
using homebrew, apt, etc.
|
|
44
45
|
|
|
46
|
+
## Windows
|
|
47
|
+
|
|
48
|
+
Binaries require x64 Windows 10 or newer. (For x86 or older Windows you will have to build from source.)
|
|
49
|
+
|
|
50
|
+
Use an [official Windows Python release](https://www.python.org/downloads/windows/) rather than WSL, MSYS, etc.
|
|
51
|
+
|
|
52
|
+
## MacOS
|
|
53
|
+
|
|
54
|
+
Binaries require:
|
|
55
|
+
* arm64 MacOS 14
|
|
56
|
+
* x64 MacOS 10.13, or newer.
|
|
57
|
+
|
|
58
|
+
Older MacOS requires building from source but this is usually simple:
|
|
59
|
+
|
|
60
|
+
brew install pkg-config
|
|
61
|
+
brew install raylib
|
|
62
|
+
python3 -m pip install raylib==5.0.0.4
|
|
63
|
+
|
|
64
|
+
(I do have binaries for arm64 MacOS 11, 12 and 13 but I have no way of testing they work, so post an issue
|
|
65
|
+
if you want to test them.)
|
|
66
|
+
|
|
67
|
+
## Linux
|
|
68
|
+
|
|
69
|
+
Binaries require OS newer than Ubuntu 2020, x64 or arm64. Otherwise build from source.
|
|
70
|
+
(Pip should attempt automatically but will need Raylib itself installed and also pkg-config.)
|
|
71
|
+
|
|
72
|
+
The arm64 binaries are built on Raspberry Pi arm64 Bullseye with OpenGL 2.0
|
|
73
|
+
so may not work on other boards.
|
|
74
|
+
|
|
45
75
|
## Raspberry Pi
|
|
46
76
|
|
|
47
77
|
[Using on Rasperry Pi](RPI.rst)
|
|
@@ -50,38 +80,52 @@ using homebrew, apt, etc.
|
|
|
50
80
|
|
|
51
81
|
There is now a separate dynamic version of this binding:
|
|
52
82
|
|
|
83
|
+
python3 -m pip uninstall raylib
|
|
53
84
|
python3 -m pip install raylib_dynamic
|
|
54
85
|
|
|
55
86
|
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)
|
|
56
87
|
|
|
57
|
-
##
|
|
88
|
+
## SDL backend
|
|
89
|
+
|
|
90
|
+
This is not well tested but has better support for controllers:
|
|
91
|
+
|
|
92
|
+
python3 -m pip uninstall raylib
|
|
93
|
+
python3 -m pip install raylib_sdl
|
|
94
|
+
|
|
95
|
+
You can't have multiple raylib packages installed at once.
|
|
96
|
+
|
|
97
|
+
## DRM backend
|
|
98
|
+
|
|
99
|
+
This uses the Linux framebuffer for devices that don't run X11/Wayland:
|
|
58
100
|
|
|
59
|
-
|
|
60
|
-
|
|
101
|
+
python3 -m pip uninstall raylib
|
|
102
|
+
python3 -m pip install raylib_drm
|
|
61
103
|
|
|
62
|
-
|
|
104
|
+
You can't have multiple raylib packages installed at once.
|
|
63
105
|
|
|
64
106
|
## Problems?
|
|
65
107
|
|
|
66
108
|
If it doesn't work, [try to build manually.](BUILDING.rst). If that works then [submit an issue](https://github.com/electronstudio/raylib-python-cffi/issues)
|
|
67
109
|
to let us know what you did.
|
|
68
110
|
|
|
69
|
-
If you need help you can try asking
|
|
111
|
+
If you need help you can try asking on [our discord](https://discord.gg/fKDwt85aX6). There is also a large [Raylib discord](https://discord.gg/raylib)
|
|
112
|
+
for issues that are not Python-specific.
|
|
70
113
|
|
|
71
114
|
If it still doesn't work, [submit an issue](https://github.com/electronstudio/raylib-python-cffi/issues).
|
|
72
115
|
|
|
73
116
|
|
|
74
117
|
# How to use
|
|
75
118
|
|
|
76
|
-
There are two
|
|
119
|
+
There are two modules in the raylib package, `raylib` and `pyray`. (There is no separate package for
|
|
120
|
+
pyray). You can use either or both:
|
|
77
121
|
|
|
78
122
|
### If you are familiar with C coding and the Raylib C library and you want to use an exact copy of the C API
|
|
79
123
|
|
|
80
|
-
Use [the
|
|
124
|
+
Use [the raylib module](https://electronstudio.github.io/raylib-python-cffi/raylib.html).
|
|
81
125
|
|
|
82
|
-
### If you prefer a
|
|
126
|
+
### If you prefer a more Pythonistic API
|
|
83
127
|
|
|
84
|
-
Use [the
|
|
128
|
+
Use [the pyray module](https://electronstudio.github.io/raylib-python-cffi/pyray.html).
|
|
85
129
|
|
|
86
130
|
# Running in a web browser
|
|
87
131
|
|
|
@@ -143,9 +187,9 @@ A related library (that is a work in progress!):
|
|
|
143
187
|
* Converting more examples from C to Python
|
|
144
188
|
* Testing on more platforms
|
|
145
189
|
|
|
146
|
-
# License
|
|
190
|
+
# License
|
|
147
191
|
|
|
148
|
-
|
|
192
|
+
Eclipse Public License, so you are free to
|
|
149
193
|
statically link and use in non-free / proprietary / commercial projects!
|
|
150
194
|
|
|
151
195
|
# Performance
|
|
@@ -29,9 +29,8 @@ current_module = __import__(__name__)
|
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
def _underscore(word: str) -> str:
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
"""
|
|
32
|
+
word = re.sub('2D$', '_2d', word)
|
|
33
|
+
word = re.sub('3D$', '_3d', word)
|
|
35
34
|
word = re.sub(r"([A-Z]+)([A-Z][a-z])", r'\1_\2', word)
|
|
36
35
|
word = re.sub(r"([a-z\d])([A-Z])", r'\1_\2', word)
|
|
37
36
|
word = word.replace("-", "_")
|
|
@@ -136,7 +135,7 @@ def _make_struct_constructor_function(struct):
|
|
|
136
135
|
|
|
137
136
|
for name, attr in getmembers(rl):
|
|
138
137
|
# print(name, attr)
|
|
139
|
-
uname = _underscore(name)
|
|
138
|
+
uname = _underscore(name)
|
|
140
139
|
if isbuiltin(attr) or str(type(attr)) == "<class '_cffi_backend.__FFIFunctionWrapper'>" or str(
|
|
141
140
|
type(attr)) == "<class '_cffi_backend._CDataBase'>":
|
|
142
141
|
# print(attr.__call__)
|