Skip to content

Commit a6cca9f

Browse files
update docs with links
1 parent 240ede7 commit a6cca9f

File tree

15 files changed

+164
-80
lines changed

15 files changed

+164
-80
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,3 +101,4 @@ venv.bak/
101101

102102
# mypy
103103
.mypy_cache/
104+
.aider*

README.md

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

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

8-
Chatroom: [Discord](https://discord.gg/fKDwt85aX6)
9-
108
HELP WANTED: [writing examples](https://github.com/electronstudio/raylib-python-cffi/issues/155)
119

1210
Features:
@@ -19,9 +17,6 @@ original Raylib.
1917
* Docstrings and auto-completion.
2018
* Type checking with Mypy
2119

22-
23-
[Full documentation](http://electronstudio.github.io/raylib-python-cffi)
24-
2520
# Quickstart
2621

2722
`pip3 install raylib==5.5.0.2 --break-system-packages`
@@ -36,6 +31,19 @@ while not window_should_close():
3631
close_window()
3732
```
3833

34+
# Links
35+
36+
* [Tutorial video](https://www.youtube.com/watch?v=UoAsDlUwjy0&lc=UgxCR-tvnQJITZr2IvN4AaABAg)
37+
* [Full documentation](http://electronstudio.github.io/raylib-python-cffi)
38+
* [Imgui integration](https://github.com/Scr44gr/raylib-imgui)
39+
* [Examples](https://github.com/electronstudio/raylib-python-cffi/tree/master/examples)
40+
* [Blep's examples](https://github.com/blep/pyray_examples)
41+
* [Raylib Python Discord](https://discord.gg/fKDwt85aX6)
42+
* [Raylib General Discord](https://discord.com/invite/raylib)
43+
* [Python video player](https://github.com/anrayliu/pyvidplayer2)
44+
* [A Vector2 class](https://github.com/electronstudio/raylib-python-cffi/blob/master/examples/extra/vector2_extended.py)
45+
* [Raylib C FAQ](https://github.com/raysan5/raylib/wiki/Frequently-Asked-Questions/)
46+
3947
# Installation
4048

4149
If you are on a modern Linux you will probably want to create a venv:

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: f2032a6434b52f7c68551d0ad70d555b
3+
config: 8201ba0ecd19ace25eb070033b3dde79
44
tags: 645f666f9bcd5a90fca523b33c5a78b7

docs/BUILDING.html

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
<ul class="current">
4848
<li class="toctree-l1"><a class="reference internal" href="README.html">Python Bindings for Raylib 5.5</a></li>
4949
<li class="toctree-l1"><a class="reference internal" href="README.html#quickstart">Quickstart</a></li>
50+
<li class="toctree-l1"><a class="reference internal" href="README.html#links">Links</a></li>
5051
<li class="toctree-l1"><a class="reference internal" href="README.html#installation">Installation</a></li>
5152
<li class="toctree-l1"><a class="reference internal" href="README.html#backends">Backends</a></li>
5253
<li class="toctree-l1"><a class="reference internal" href="README.html#how-to-use">How to use</a></li>
@@ -63,6 +64,7 @@
6364
<li class="toctree-l1"><a class="reference internal" href="dynamic.html">Dynamic Bindings</a></li>
6465
<li class="toctree-l1 current"><a class="current reference internal" href="#">Building from source</a><ul>
6566
<li class="toctree-l2"><a class="reference internal" href="#have-pip-build-from-source">Have Pip build from source</a></li>
67+
<li class="toctree-l2"><a class="reference internal" href="#environment-variables-new-in-5-5-0-3">Environment variables (new in 5.5.0.3)</a></li>
6668
<li class="toctree-l2"><a class="reference internal" href="#or-build-from-source-manually">Or, Build from source manually</a><ul>
6769
<li class="toctree-l3"><a class="reference internal" href="#windows-manual-build">Windows manual build</a></li>
6870
<li class="toctree-l3"><a class="reference internal" href="#linux-manual-build">Linux manual build</a></li>
@@ -102,23 +104,44 @@
102104
<h1>Building from source<a class="headerlink" href="#building-from-source" title="Link to this heading"></a></h1>
103105
<section id="have-pip-build-from-source">
104106
<h2>Have Pip build from source<a class="headerlink" href="#have-pip-build-from-source" title="Link to this heading"></a></h2>
105-
<p>This is useful if the binaries don’t work on your system, or you want to use a newer version of Raylib.</p>
107+
<p>This is useful if the binaries don’t work on your system, or you want to use a newer version of Raylib, or compile
108+
Raylib with a different version of OpenGL than the default. (e.g. on old hardware use cmake option <code class="docutils literal notranslate"><span class="pre">-DOPENGL_VERSION=1.1</span></code>)</p>
106109
<p>First make sure Raylib is installed. On Linux/Mac it must include the pkg-config files. Best way to ensure this
107110
is to compile and install Raylib using CMake: <a class="reference external" href="https://github.com/raysan5/raylib/wiki/Working-on-GNU-Linux#build-raylib-using-cmake">https://github.com/raysan5/raylib/wiki/Working-on-GNU-Linux#build-raylib-using-cmake</a></p>
108111
<p>Requirements for build: cmake, pkg-config.</p>
109-
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">cd</span> <span class="n">raylib</span><span class="o">-</span><span class="mf">5.0</span>
112+
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">wget</span> <span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">github</span><span class="o">.</span><span class="n">com</span><span class="o">/</span><span class="n">raysan5</span><span class="o">/</span><span class="n">raylib</span><span class="o">/</span><span class="n">archive</span><span class="o">/</span><span class="n">refs</span><span class="o">/</span><span class="n">tags</span><span class="o">/</span><span class="mf">5.5</span><span class="o">.</span><span class="n">zip</span>
113+
<span class="n">unzip</span> <span class="mf">5.5</span><span class="o">.</span><span class="n">zip</span>
114+
<span class="n">cd</span> <span class="n">raylib</span><span class="o">-</span><span class="mf">5.5</span>
110115
<span class="n">mkdir</span> <span class="n">build</span>
111116
<span class="n">cd</span> <span class="n">build</span>
112117
<span class="n">cmake</span> <span class="o">-</span><span class="n">DCUSTOMIZE_BUILD</span><span class="o">=</span><span class="n">ON</span> <span class="o">-</span><span class="n">DSUPPORT_FILEFORMAT_JPG</span><span class="o">=</span><span class="n">ON</span> <span class="o">-</span><span class="n">DSUPPORT_FILEFORMAT_FLAC</span><span class="o">=</span><span class="n">ON</span> <span class="o">-</span><span class="n">DWITH_PIC</span><span class="o">=</span><span class="n">ON</span> <span class="o">-</span><span class="n">DCMAKE_BUILD_TYPE</span><span class="o">=</span><span class="n">Release</span> <span class="o">..</span>
113118
<span class="n">make</span>
114119
<span class="n">sudo</span> <span class="n">make</span> <span class="n">install</span>
120+
<span class="n">export</span> <span class="n">PKG_CONFIG_PATH</span><span class="o">=/</span><span class="n">usr</span><span class="o">/</span><span class="n">local</span><span class="o">/</span><span class="n">lib</span><span class="o">/</span><span class="n">pkgconfig</span>
115121
</pre></div>
116122
</div>
117123
<p>Then ask Pip to build from source:</p>
118124
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">pip3</span> <span class="n">install</span> <span class="o">--</span><span class="n">no</span><span class="o">-</span><span class="n">cache</span><span class="o">-</span><span class="nb">dir</span> <span class="o">--</span><span class="n">no</span><span class="o">-</span><span class="n">binary</span> <span class="n">raylib</span> <span class="o">--</span><span class="n">upgrade</span> <span class="o">--</span><span class="n">force</span><span class="o">-</span><span class="n">reinstall</span> <span class="n">raylib</span>
119125
</pre></div>
120126
</div>
121127
</section>
128+
<section id="environment-variables-new-in-5-5-0-3">
129+
<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>
131+
<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>
132+
<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.
133+
e.g.: <code class="docutils literal notranslate"><span class="pre">&quot;-L/usr/local/lib</span> <span class="pre">-lraylib&quot;</span></code></p>
134+
<p><code class="docutils literal notranslate"><span class="pre">RAYLIB_INCLUDE_PATH</span></code>: Directory to find raylib.h rather than getting from pkg-config.
135+
e.g.: <code class="docutils literal notranslate"><span class="pre">/usr/local/include</span></code></p>
136+
<p><code class="docutils literal notranslate"><span class="pre">RAYGUI_INCLUDE_PATH</span></code>: Directory to find raygui.h
137+
e.g.: <code class="docutils literal notranslate"><span class="pre">/usr/local/include</span></code></p>
138+
<p><code class="docutils literal notranslate"><span class="pre">GLFW_INCLUDE_PATH</span></code>: Directory to find glfw3.h
139+
e.g.: <code class="docutils literal notranslate"><span class="pre">/usr/local/include/GLFW</span></code></p>
140+
<p><code class="docutils literal notranslate"><span class="pre">PHYSAC_INCLUDE_PATH</span></code>: Directory to find physac.h
141+
e.g.: <code class="docutils literal notranslate"><span class="pre">/usr/local/include</span></code></p>
142+
<p><code class="docutils literal notranslate"><span class="pre">LIBFFI_INCLUDE_PATH</span></code>:
143+
e.g.: <code class="docutils literal notranslate"><span class="pre">/usr/local/include</span></code></p>
144+
</section>
122145
<section id="or-build-from-source-manually">
123146
<h2>Or, Build from source manually<a class="headerlink" href="#or-build-from-source-manually" title="Link to this heading"></a></h2>
124147
<p>Useful if the Pip build doesn’t work and you want to debug it, or you want to contribute to the
@@ -160,11 +183,6 @@ <h3>Windows manual build<a class="headerlink" href="#windows-manual-build" title
160183
<span class="n">python</span> <span class="n">setup</span><span class="o">.</span><span class="n">py</span> <span class="n">bdist_wheel</span>
161184
</pre></div>
162185
</div>
163-
<div class="admonition-todo admonition" id="id1">
164-
<p class="admonition-title">Todo</p>
165-
<p>There’s a hardcoded path (to the raylib header files) in <cite>raylib/build.py</cite> you will probably need to edit.
166-
Would be useful if some Windows user could figure out how to auto detect this.</p>
167-
</div>
168186
<p>Then install it:</p>
169187
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">pip3</span> <span class="n">install</span> <span class="n">dist</span>\<span class="n">raylib</span><span class="o">-</span><span class="mf">3.7.0</span><span class="o">-</span><span class="n">cp37</span><span class="o">-</span><span class="n">cp37m</span><span class="o">-</span><span class="n">win_amd64</span><span class="o">.</span><span class="n">whl</span>
170188
</pre></div>
@@ -191,6 +209,7 @@ <h3>Linux manual build<a class="headerlink" href="#linux-manual-build" title="Li
191209
<span class="n">cd</span> <span class="n">build</span>
192210
<span class="n">cmake</span> <span class="o">-</span><span class="n">DCUSTOMIZE_BUILD</span><span class="o">=</span><span class="n">ON</span> <span class="o">-</span><span class="n">DSUPPORT_FILEFORMAT_JPG</span><span class="o">=</span><span class="n">ON</span> <span class="o">-</span><span class="n">DSUPPORT_FILEFORMAT_FLAC</span><span class="o">=</span><span class="n">ON</span> <span class="o">-</span><span class="n">DWITH_PIC</span><span class="o">=</span><span class="n">ON</span> <span class="o">-</span><span class="n">DCMAKE_BUILD_TYPE</span><span class="o">=</span><span class="n">Release</span> <span class="o">..</span>
193211
<span class="n">sudo</span> <span class="n">make</span> <span class="n">install</span>
212+
<span class="n">export</span> <span class="n">PKG_CONFIG_PATH</span><span class="o">=/</span><span class="n">usr</span><span class="o">/</span><span class="n">local</span><span class="o">/</span><span class="n">lib</span><span class="o">/</span><span class="n">pkgconfig</span>
194213
</pre></div>
195214
</div>
196215
<div class="admonition note">
@@ -240,7 +259,7 @@ <h3>Linux manual build<a class="headerlink" href="#linux-manual-build" title="Li
240259
<code class="docutils literal notranslate"><span class="pre">--plat-name</span> <span class="pre">manylinux2014_x86_64</span></code> so on linux please run
241260
<code class="docutils literal notranslate"><span class="pre">./raylib/build_multi_linux.sh</span></code> )</p>
242261
</div>
243-
<div class="admonition-todo admonition" id="id2">
262+
<div class="admonition-todo admonition" id="id1">
244263
<p class="admonition-title">Todo</p>
245264
<p>Separate the instructions for preparing the dynamic module
246265
from the instructions for building the static module!</p>

docs/README.html

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
</ul>
5353
</li>
5454
<li class="toctree-l1"><a class="reference internal" href="#quickstart">Quickstart</a></li>
55+
<li class="toctree-l1"><a class="reference internal" href="#links">Links</a></li>
5556
<li class="toctree-l1"><a class="reference internal" href="#installation">Installation</a><ul>
5657
<li class="toctree-l2"><a class="reference internal" href="#windows">Windows</a></li>
5758
<li class="toctree-l2"><a class="reference internal" href="#macos">MacOS</a></li>
@@ -124,7 +125,6 @@ <h2>Backends: Desktop, SDL, DRM, Web<a class="headerlink" href="#backends-deskto
124125
<section id="platforms-windows-mac-linux-raspberry-pi-web">
125126
<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>
126127
<p><img alt="PyPI - Downloads" src="https://img.shields.io/pypi/dm/raylib" /></p>
127-
<p>Chatroom: <a class="reference external" href="https://discord.gg/fKDwt85aX6">Discord</a></p>
128128
<p>HELP WANTED: <a class="reference external" href="https://github.com/electronstudio/raylib-python-cffi/issues/155">writing examples</a></p>
129129
<p>Features:</p>
130130
<ul class="simple">
@@ -136,7 +136,6 @@ <h2>Platforms: Windows, Mac, Linux, Raspberry Pi, Web<a class="headerlink" href=
136136
<li><p>Docstrings and auto-completion.</p></li>
137137
<li><p>Type checking with Mypy</p></li>
138138
</ul>
139-
<p><a class="reference external" href="http://electronstudio.github.io/raylib-python-cffi">Full documentation</a></p>
140139
</section>
141140
</section>
142141
<section id="quickstart">
@@ -153,6 +152,21 @@ <h1>Quickstart<a class="headerlink" href="#quickstart" title="Link to this headi
153152
</pre></div>
154153
</div>
155154
</section>
155+
<section id="links">
156+
<h1>Links<a class="headerlink" href="#links" title="Link to this heading"></a></h1>
157+
<ul class="simple">
158+
<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://github.com/Scr44gr/raylib-imgui">Imgui integration</a></p></li>
161+
<li><p><a class="reference external" href="https://github.com/electronstudio/raylib-python-cffi/tree/master/examples">Examples</a></p></li>
162+
<li><p><a class="reference external" href="https://github.com/blep/pyray_examples">Blep’s examples</a></p></li>
163+
<li><p><a class="reference external" href="https://discord.gg/fKDwt85aX6">Raylib Python Discord</a></p></li>
164+
<li><p><a class="reference external" href="https://discord.com/invite/raylib">Raylib General Discord</a></p></li>
165+
<li><p><a class="reference external" href="https://github.com/anrayliu/pyvidplayer2">Python video player</a></p></li>
166+
<li><p><a class="reference external" href="https://github.com/electronstudio/raylib-python-cffi/blob/master/examples/extra/vector2_extended.py">A Vector2 class</a></p></li>
167+
<li><p><a class="reference external" href="https://github.com/raysan5/raylib/wiki/Frequently-Asked-Questions/">Raylib C FAQ</a></p></li>
168+
</ul>
169+
</section>
156170
<section id="installation">
157171
<h1>Installation<a class="headerlink" href="#installation" title="Link to this heading"></a></h1>
158172
<p>If you are on a modern Linux you will probably want to create a venv:</p>

docs/RPI.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
<ul class="current">
4747
<li class="toctree-l1"><a class="reference internal" href="README.html">Python Bindings for Raylib 5.5</a></li>
4848
<li class="toctree-l1"><a class="reference internal" href="README.html#quickstart">Quickstart</a></li>
49+
<li class="toctree-l1"><a class="reference internal" href="README.html#links">Links</a></li>
4950
<li class="toctree-l1"><a class="reference internal" href="README.html#installation">Installation</a></li>
5051
<li class="toctree-l1"><a class="reference internal" href="README.html#backends">Backends</a></li>
5152
<li class="toctree-l1"><a class="reference internal" href="README.html#how-to-use">How to use</a></li>

docs/_sources/BUILDING.rst.txt

Lines changed: 37 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ Building from source
44
Have Pip build from source
55
--------------------------
66

7-
This is useful if the binaries don’t work on your system, or you want to use a newer version of Raylib.
7+
This is useful if the binaries don’t work on your system, or you want to use a newer version of Raylib, or compile
8+
Raylib with a different version of OpenGL than the default. (e.g. on old hardware use cmake option ``-DOPENGL_VERSION=1.1``)
89

910
First make sure Raylib is installed. On Linux/Mac it must include the pkg-config files. Best way to ensure this
1011
is to compile and install Raylib using CMake: https://github.com/raysan5/raylib/wiki/Working-on-GNU-Linux#build-raylib-using-cmake
@@ -13,21 +14,47 @@ Requirements for build: cmake, pkg-config.
1314

1415
::
1516

16-
cd raylib-5.0
17-
mkdir build
18-
cd build
19-
cmake -DCUSTOMIZE_BUILD=ON -DSUPPORT_FILEFORMAT_JPG=ON -DSUPPORT_FILEFORMAT_FLAC=ON -DWITH_PIC=ON -DCMAKE_BUILD_TYPE=Release ..
20-
make
21-
sudo make install
22-
23-
17+
wget https://github.com/raysan5/raylib/archive/refs/tags/5.5.zip
18+
unzip 5.5.zip
19+
cd raylib-5.5
20+
mkdir build
21+
cd build
22+
cmake -DCUSTOMIZE_BUILD=ON -DSUPPORT_FILEFORMAT_JPG=ON -DSUPPORT_FILEFORMAT_FLAC=ON -DWITH_PIC=ON -DCMAKE_BUILD_TYPE=Release ..
23+
make
24+
sudo make install
25+
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
2426

2527
Then ask Pip to build from source:
2628

2729
::
2830

2931
pip3 install --no-cache-dir --no-binary raylib --upgrade --force-reinstall raylib
3032

33+
Environment variables (new in 5.5.0.3)
34+
--------------------------------------
35+
36+
If plg-config doesn't work you can manually set these environment variables:
37+
38+
``RAYLIB_PLATFORM``: Any one of: ``Desktop``, ``SDL``, ``DRM``, ``PLATFORM_COMMA``
39+
40+
``RAYLIB_LINK_ARGS``: Arguments to pass to the linker rather than getting them from pkg-config.
41+
e.g.: ``"-L/usr/local/lib -lraylib"``
42+
43+
``RAYLIB_INCLUDE_PATH``: Directory to find raylib.h rather than getting from pkg-config.
44+
e.g.: ``/usr/local/include``
45+
46+
``RAYGUI_INCLUDE_PATH``: Directory to find raygui.h
47+
e.g.: ``/usr/local/include``
48+
49+
``GLFW_INCLUDE_PATH``: Directory to find glfw3.h
50+
e.g.: ``/usr/local/include/GLFW``
51+
52+
``PHYSAC_INCLUDE_PATH``: Directory to find physac.h
53+
e.g.: ``/usr/local/include``
54+
55+
``LIBFFI_INCLUDE_PATH``:
56+
e.g.: ``/usr/local/include``
57+
3158
Or, Build from source manually
3259
------------------------------
3360

@@ -83,11 +110,6 @@ To build a binary wheel distribution:
83110
pip3 install wheel
84111
python setup.py bdist_wheel
85112

86-
.. TODO::
87-
There's a hardcoded path (to the raylib header files) in `raylib/build.py` you will probably need to edit.
88-
Would be useful if some Windows user could figure out how to auto detect this.
89-
90-
91113
Then install it:
92114

93115
::
@@ -121,6 +143,7 @@ Build and install Raylib from the raylib-c directory.
121143
cd build
122144
cmake -DCUSTOMIZE_BUILD=ON -DSUPPORT_FILEFORMAT_JPG=ON -DSUPPORT_FILEFORMAT_FLAC=ON -DWITH_PIC=ON -DCMAKE_BUILD_TYPE=Release ..
123145
sudo make install
146+
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
124147

125148
.. note:: Optional: Build the Raylib shared libs, if you plan to use
126149
``raylib_dynamic`` binding.

0 commit comments

Comments
 (0)