update docs

This commit is contained in:
Richard Smith 2025-02-12 02:43:35 +00:00
parent 4bdd922417
commit 32061daadb
4 changed files with 39 additions and 18 deletions

View file

@ -24,7 +24,7 @@ original Raylib.
# Quickstart # Quickstart
`pip3 install raylib==5.5.0.0` `pip3 install raylib==5.5.0.2 --break-system-packages`
```python ```python
from pyray import * from pyray import *
init_window(800, 450, "Hello") init_window(800, 450, "Hello")
@ -38,14 +38,19 @@ close_window()
# Installation # Installation
First make sure you have the latest pip installed: If you are on a modern Linux you will probably want to create a venv:
python3 -m venv venv
source venv/bin/activate
Then make sure you have the latest pip installed:
python3 -m pip install --upgrade pip python3 -m pip install --upgrade pip
Then install Then install
python3 -m pip install setuptools python3 -m pip install setuptools
python3 -m pip install raylib==5.5.0.0 python3 -m pip install raylib==5.5.0.2
On most platforms it should install a binary wheel. If yours isn't available then pip will attempt to build from 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. source, in which case you will need to have Raylib development libs installed, e.g.
@ -67,7 +72,7 @@ Older MacOS requires building from source but this is usually simple:
brew install pkg-config brew install pkg-config
brew install raylib brew install raylib
python3 -m pip install raylib==5.5.0.0 python3 -m pip install raylib==5.5.0.2
(I do have binaries for arm64 MacOS 11, 12 and 13 but I have no way of testing they work, so post an issue (I do have binaries for arm64 MacOS 11, 12 and 13 but I have no way of testing they work, so post an issue
if you want to test them.) if you want to test them.)
@ -181,7 +186,7 @@ Point your browser to http://localhost:8000
Some features may not work, so you can disable them like this: Some features may not work, so you can disable them like this:
```python ```python
if platform.system() != "Emscripten": # audio does not work on current version of emscripten if platform.system() != "Emscripten": # audio may not work on current version of emscripten
init_audio_device() init_audio_device()
``` ```

View file

@ -123,8 +123,10 @@
</section> </section>
<section id="platforms-windows-mac-linux-raspberry-pi-web"> <section id="platforms-windows-mac-linux-raspberry-pi-web">
<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> <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>
<p><img alt="PyPI - Downloads" src="https://img.shields.io/pypi/dm/raylib" /></p>
<p>Chatroom: <a class="reference external" href="https://discord.gg/fKDwt85aX6">Discord</a></p> <p>Chatroom: <a class="reference external" href="https://discord.gg/fKDwt85aX6">Discord</a></p>
<p><a class="reference external" href="https://github.com/electronstudio/raylib-python-cffi/issues/155">HELP WANTED: writing examples</a></p> <p>HELP WANTED: <a class="reference external" href="https://github.com/electronstudio/raylib-python-cffi/issues/155">writing examples</a></p>
<p>Features:</p>
<ul class="simple"> <ul class="simple">
<li><p>CFFI API static bindings.</p></li> <li><p>CFFI API static bindings.</p></li>
<li><p>Automatically generated to be as close as possible to <li><p>Automatically generated to be as close as possible to
@ -139,7 +141,7 @@ original Raylib.</p></li>
</section> </section>
<section id="quickstart"> <section id="quickstart">
<h1>Quickstart<a class="headerlink" href="#quickstart" title="Link to this heading"></a></h1> <h1>Quickstart<a class="headerlink" href="#quickstart" title="Link to this heading"></a></h1>
<p><code class="docutils literal notranslate"><span class="pre">pip3</span> <span class="pre">install</span> <span class="pre">raylib==5.5.0.0</span></code></p> <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>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">pyray</span> <span class="kn">import</span> <span class="o">*</span> <div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">pyray</span> <span class="kn">import</span> <span class="o">*</span>
<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> <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>
<span class="k">while</span> <span class="ow">not</span> <span class="n">window_should_close</span><span class="p">():</span> <span class="k">while</span> <span class="ow">not</span> <span class="n">window_should_close</span><span class="p">():</span>
@ -153,13 +155,18 @@ original Raylib.</p></li>
</section> </section>
<section id="installation"> <section id="installation">
<h1>Installation<a class="headerlink" href="#installation" title="Link to this heading"></a></h1> <h1>Installation<a class="headerlink" href="#installation" title="Link to this heading"></a></h1>
<p>First make sure you have the latest pip installed:</p> <p>If you are on a modern Linux you will probably want to create a venv:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>python3 -m venv venv
source venv/bin/activate
</pre></div>
</div>
<p>Then make sure you have the latest pip installed:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>python3 -m pip install --upgrade pip <div class="highlight-none notranslate"><div class="highlight"><pre><span></span>python3 -m pip install --upgrade pip
</pre></div> </pre></div>
</div> </div>
<p>Then install</p> <p>Then install</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>python3 -m pip install setuptools <div class="highlight-none notranslate"><div class="highlight"><pre><span></span>python3 -m pip install setuptools
python3 -m pip install raylib==5.5.0.0 python3 -m pip install raylib==5.5.0.2
</pre></div> </pre></div>
</div> </div>
<p>On most platforms it should install a binary wheel. If yours isnt available then pip will attempt to build from <p>On most platforms it should install a binary wheel. If yours isnt available then pip will attempt to build from
@ -180,7 +187,7 @@ using homebrew, apt, etc.</p>
<p>Older MacOS requires building from source but this is usually simple:</p> <p>Older MacOS requires building from source but this is usually simple:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>brew install pkg-config <div class="highlight-none notranslate"><div class="highlight"><pre><span></span>brew install pkg-config
brew install raylib brew install raylib
python3 -m pip install raylib==5.5.0.0 python3 -m pip install raylib==5.5.0.2
</pre></div> </pre></div>
</div> </div>
<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 <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
@ -286,7 +293,7 @@ python3.12 -m pygbag --PYBUILD 3.12 --ume_block 0 --template noctx.tmpl --git my
</div> </div>
<p>Point your browser to http://localhost:8000</p> <p>Point your browser to http://localhost:8000</p>
<p>Some features may not work, so you can disable them like this:</p> <p>Some features may not work, so you can disable them like this:</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="k">if</span> <span class="n">platform</span><span class="o">.</span><span class="n">system</span><span class="p">()</span> <span class="o">!=</span> <span class="s2">&quot;Emscripten&quot;</span><span class="p">:</span> <span class="c1"># audio does not work on current version of emscripten</span> <div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="k">if</span> <span class="n">platform</span><span class="o">.</span><span class="n">system</span><span class="p">()</span> <span class="o">!=</span> <span class="s2">&quot;Emscripten&quot;</span><span class="p">:</span> <span class="c1"># audio may not work on current version of emscripten</span>
<span class="n">init_audio_device</span><span class="p">()</span> <span class="n">init_audio_device</span><span class="p">()</span>
</pre></div> </pre></div>
</div> </div>

View file

@ -3,9 +3,13 @@
## Backends: Desktop, SDL, DRM, Web ## Backends: Desktop, SDL, DRM, Web
## Platforms: Windows, Mac, Linux, Raspberry Pi, Web ## Platforms: Windows, Mac, Linux, Raspberry Pi, Web
![PyPI - Downloads](https://img.shields.io/pypi/dm/raylib)
Chatroom: [Discord](https://discord.gg/fKDwt85aX6) Chatroom: [Discord](https://discord.gg/fKDwt85aX6)
[HELP WANTED: writing examples](https://github.com/electronstudio/raylib-python-cffi/issues/155) HELP WANTED: [writing examples](https://github.com/electronstudio/raylib-python-cffi/issues/155)
Features:
* CFFI API static bindings. * CFFI API static bindings.
* Automatically generated to be as close as possible to * Automatically generated to be as close as possible to
@ -20,7 +24,7 @@ original Raylib.
# Quickstart # Quickstart
`pip3 install raylib==5.5.0.0` `pip3 install raylib==5.5.0.2 --break-system-packages`
```python ```python
from pyray import * from pyray import *
init_window(800, 450, "Hello") init_window(800, 450, "Hello")
@ -34,14 +38,19 @@ close_window()
# Installation # Installation
First make sure you have the latest pip installed: If you are on a modern Linux you will probably want to create a venv:
python3 -m venv venv
source venv/bin/activate
Then make sure you have the latest pip installed:
python3 -m pip install --upgrade pip python3 -m pip install --upgrade pip
Then install Then install
python3 -m pip install setuptools python3 -m pip install setuptools
python3 -m pip install raylib==5.5.0.0 python3 -m pip install raylib==5.5.0.2
On most platforms it should install a binary wheel. If yours isn't available then pip will attempt to build from 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. source, in which case you will need to have Raylib development libs installed, e.g.
@ -63,7 +72,7 @@ Older MacOS requires building from source but this is usually simple:
brew install pkg-config brew install pkg-config
brew install raylib brew install raylib
python3 -m pip install raylib==5.5.0.0 python3 -m pip install raylib==5.5.0.2
(I do have binaries for arm64 MacOS 11, 12 and 13 but I have no way of testing they work, so post an issue (I do have binaries for arm64 MacOS 11, 12 and 13 but I have no way of testing they work, so post an issue
if you want to test them.) if you want to test them.)
@ -177,7 +186,7 @@ Point your browser to http://localhost:8000
Some features may not work, so you can disable them like this: Some features may not work, so you can disable them like this:
```python ```python
if platform.system() != "Emscripten": # audio does not work on current version of emscripten if platform.system() != "Emscripten": # audio may not work on current version of emscripten
init_audio_device() init_audio_device()
``` ```

File diff suppressed because one or more lines are too long