summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-04-11 16:27:06 +0000
committerCoprDistGit <infra@openeuler.org>2023-04-11 16:27:06 +0000
commitcf0dcb61ac4bc531842cdfdb8bb0868ed1964a7c (patch)
treee151b4bfa7d709ddfd99782941cbcee889ab7bfb
parent3794dd88b799a6da3224e5da80d3fac15588bc2a (diff)
automatic import of python-raylib
-rw-r--r--.gitignore1
-rw-r--r--python-raylib.spec496
-rw-r--r--sources1
3 files changed, 498 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..7f0fb22 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/raylib-4.2.1.2.tar.gz
diff --git a/python-raylib.spec b/python-raylib.spec
new file mode 100644
index 0000000..7745d78
--- /dev/null
+++ b/python-raylib.spec
@@ -0,0 +1,496 @@
+%global _empty_manifest_terminate_build 0
+Name: python-raylib
+Version: 4.2.1.2
+Release: 1
+Summary: Python CFFI bindings for Raylib
+License: EPL-2.0
+URL: https://github.com/electronstudio/raylib-python-cffi
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/c9/6b/4d1094462f96e510a87f147dbda0336d1e80ed94c8bfd04e03e5a96ff25a/raylib-4.2.1.2.tar.gz
+
+Requires: python3-cffi
+Requires: python3-inflection
+
+%description
+# Python Bindings for Raylib 4.2
+
+New CFFI API static bindings.
+* Automatically generated to be as close as possible to
+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 and physac**
+
+[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()
+
+
+# Installation
+
+First make sure you have the latest pip installed:
+
+ python3 -m pip install --upgrade pip
+
+Then install
+
+ python3 -m pip install raylib
+
+On most platforms it should install a binary wheel (Windows 10 x64, MacOS 10.15 x64, Linux Ubuntu1804 x64).
+
+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.
+
+## Raspberry Pi
+
+[Using on Rasperry Pi](RPI.rst)
+
+## Dynamic binding version
+
+There is now a separate dynamic version of this binding:
+
+ python3 -m pip install raylib_dynamic
+
+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
+
+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:
+
+ python3 -m pip install raylib==4.2.0.0.dev4
+
+## Problems?
+
+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)
+to let us know what you did.
+
+If you need help you can try asking [on Discord](https://discord.gg/raylib).
+
+If it still doesn't work, [submit an issue](https://github.com/electronstudio/raylib-python-cffi/issues).
+
+
+# How to use
+
+There are two APIs, you can use either or both:
+
+### If you are familiar with C coding and the Raylib C library and you want to use an exact copy of the C API
+
+Use [the C API](https://electronstudio.github.io/raylib-python-cffi/raylib.html).
+
+### If you prefer a slightly more Pythonistic API and don't mind it might be slightly slower
+
+Use [the Python API](https://electronstudio.github.io/raylib-python-cffi/pyray.html).
+
+# App showcase
+
+[Tanki](https://github.com/pkulev/tanki)
+
+[Alloy Bloxel Editor](https://pebaz.itch.io/alloy-bloxel-editor)
+
+Add your app here!
+
+# RLZero
+
+A related library (that is a work in progress!):
+
+[A simplified API for Raylib for use in education and to enable beginners to create 3d games](https://github.com/electronstudio/rlzero)
+
+# Help wanted
+
+ * Converting more examples from C to Python
+ * Testing on more platforms
+
+# License (updated)
+
+The bindings are now under the Eclipse Public License, so you are free to
+statically link and use in non-free / proprietary / commercial projects!
+
+# Performance
+
+For fastest performance use Pypy rather than standard Python.
+
+Every call to C is costly, so it's slightly faster if you use Python data structures and functions when calculating
+in your update loop
+and then only convert them to C data structures when you have to call the C functions for drawing.
+
+## Bunnymark
+
+
+| Library | Implementation | Bunnies (60 FPS) | Percentage |
+| ------------- | ------------- | ------------- | ------------- |
+| Raylib 3.7 | C | 168100 | 100% |
+| Raylib Python CFFI 3.7 | Pypy 3.7 | 33800 | 20% |
+| Raylib Python CFFI 3.7 | Python 3.9 | 7700 | 4.5% |
+| Raylib Python CFFI 3.7 | Python 3.9 Nuitka | 8600 | 5.1% |
+| Raylib Python CFFI 3.7 Dynamic | Python 3.9 | 6300 | 3.7% |
+
+# Packaging your app
+
+You can create a standalone binary using the Nuitka compiler. For example, here is how to package Bunnymark:
+
+ pip3 install nuitka
+ cd examples/textures
+ python3 -m nuitka --onefile --linux-onefile-icon resources/wabbit_alpha.png textures_bunnymark.py
+
+# Advert
+
+[RetroWar: 8-bit Party Battle](https://store.steampowered.com/app/664240/RetroWar_8bit_Party_Battle/?git) is out now. Defeat up to 15 of your friends in a tournament of 80s-inspired retro mini games.
+
+[Coding Games With Pygame Zero & Python](https://github.com/electronstudio/pygame-zero-book) is
+a book for Python beginners.
+
+
+
+%package -n python3-raylib
+Summary: Python CFFI bindings for Raylib
+Provides: python-raylib
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+BuildRequires: python3-cffi
+BuildRequires: gcc
+BuildRequires: gdb
+%description -n python3-raylib
+# Python Bindings for Raylib 4.2
+
+New CFFI API static bindings.
+* Automatically generated to be as close as possible to
+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 and physac**
+
+[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()
+
+
+# Installation
+
+First make sure you have the latest pip installed:
+
+ python3 -m pip install --upgrade pip
+
+Then install
+
+ python3 -m pip install raylib
+
+On most platforms it should install a binary wheel (Windows 10 x64, MacOS 10.15 x64, Linux Ubuntu1804 x64).
+
+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.
+
+## Raspberry Pi
+
+[Using on Rasperry Pi](RPI.rst)
+
+## Dynamic binding version
+
+There is now a separate dynamic version of this binding:
+
+ python3 -m pip install raylib_dynamic
+
+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
+
+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:
+
+ python3 -m pip install raylib==4.2.0.0.dev4
+
+## Problems?
+
+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)
+to let us know what you did.
+
+If you need help you can try asking [on Discord](https://discord.gg/raylib).
+
+If it still doesn't work, [submit an issue](https://github.com/electronstudio/raylib-python-cffi/issues).
+
+
+# How to use
+
+There are two APIs, you can use either or both:
+
+### If you are familiar with C coding and the Raylib C library and you want to use an exact copy of the C API
+
+Use [the C API](https://electronstudio.github.io/raylib-python-cffi/raylib.html).
+
+### If you prefer a slightly more Pythonistic API and don't mind it might be slightly slower
+
+Use [the Python API](https://electronstudio.github.io/raylib-python-cffi/pyray.html).
+
+# App showcase
+
+[Tanki](https://github.com/pkulev/tanki)
+
+[Alloy Bloxel Editor](https://pebaz.itch.io/alloy-bloxel-editor)
+
+Add your app here!
+
+# RLZero
+
+A related library (that is a work in progress!):
+
+[A simplified API for Raylib for use in education and to enable beginners to create 3d games](https://github.com/electronstudio/rlzero)
+
+# Help wanted
+
+ * Converting more examples from C to Python
+ * Testing on more platforms
+
+# License (updated)
+
+The bindings are now under the Eclipse Public License, so you are free to
+statically link and use in non-free / proprietary / commercial projects!
+
+# Performance
+
+For fastest performance use Pypy rather than standard Python.
+
+Every call to C is costly, so it's slightly faster if you use Python data structures and functions when calculating
+in your update loop
+and then only convert them to C data structures when you have to call the C functions for drawing.
+
+## Bunnymark
+
+
+| Library | Implementation | Bunnies (60 FPS) | Percentage |
+| ------------- | ------------- | ------------- | ------------- |
+| Raylib 3.7 | C | 168100 | 100% |
+| Raylib Python CFFI 3.7 | Pypy 3.7 | 33800 | 20% |
+| Raylib Python CFFI 3.7 | Python 3.9 | 7700 | 4.5% |
+| Raylib Python CFFI 3.7 | Python 3.9 Nuitka | 8600 | 5.1% |
+| Raylib Python CFFI 3.7 Dynamic | Python 3.9 | 6300 | 3.7% |
+
+# Packaging your app
+
+You can create a standalone binary using the Nuitka compiler. For example, here is how to package Bunnymark:
+
+ pip3 install nuitka
+ cd examples/textures
+ python3 -m nuitka --onefile --linux-onefile-icon resources/wabbit_alpha.png textures_bunnymark.py
+
+# Advert
+
+[RetroWar: 8-bit Party Battle](https://store.steampowered.com/app/664240/RetroWar_8bit_Party_Battle/?git) is out now. Defeat up to 15 of your friends in a tournament of 80s-inspired retro mini games.
+
+[Coding Games With Pygame Zero & Python](https://github.com/electronstudio/pygame-zero-book) is
+a book for Python beginners.
+
+
+
+%package help
+Summary: Development documents and examples for raylib
+Provides: python3-raylib-doc
+%description help
+# Python Bindings for Raylib 4.2
+
+New CFFI API static bindings.
+* Automatically generated to be as close as possible to
+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 and physac**
+
+[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()
+
+
+# Installation
+
+First make sure you have the latest pip installed:
+
+ python3 -m pip install --upgrade pip
+
+Then install
+
+ python3 -m pip install raylib
+
+On most platforms it should install a binary wheel (Windows 10 x64, MacOS 10.15 x64, Linux Ubuntu1804 x64).
+
+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.
+
+## Raspberry Pi
+
+[Using on Rasperry Pi](RPI.rst)
+
+## Dynamic binding version
+
+There is now a separate dynamic version of this binding:
+
+ python3 -m pip install raylib_dynamic
+
+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
+
+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:
+
+ python3 -m pip install raylib==4.2.0.0.dev4
+
+## Problems?
+
+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)
+to let us know what you did.
+
+If you need help you can try asking [on Discord](https://discord.gg/raylib).
+
+If it still doesn't work, [submit an issue](https://github.com/electronstudio/raylib-python-cffi/issues).
+
+
+# How to use
+
+There are two APIs, you can use either or both:
+
+### If you are familiar with C coding and the Raylib C library and you want to use an exact copy of the C API
+
+Use [the C API](https://electronstudio.github.io/raylib-python-cffi/raylib.html).
+
+### If you prefer a slightly more Pythonistic API and don't mind it might be slightly slower
+
+Use [the Python API](https://electronstudio.github.io/raylib-python-cffi/pyray.html).
+
+# App showcase
+
+[Tanki](https://github.com/pkulev/tanki)
+
+[Alloy Bloxel Editor](https://pebaz.itch.io/alloy-bloxel-editor)
+
+Add your app here!
+
+# RLZero
+
+A related library (that is a work in progress!):
+
+[A simplified API for Raylib for use in education and to enable beginners to create 3d games](https://github.com/electronstudio/rlzero)
+
+# Help wanted
+
+ * Converting more examples from C to Python
+ * Testing on more platforms
+
+# License (updated)
+
+The bindings are now under the Eclipse Public License, so you are free to
+statically link and use in non-free / proprietary / commercial projects!
+
+# Performance
+
+For fastest performance use Pypy rather than standard Python.
+
+Every call to C is costly, so it's slightly faster if you use Python data structures and functions when calculating
+in your update loop
+and then only convert them to C data structures when you have to call the C functions for drawing.
+
+## Bunnymark
+
+
+| Library | Implementation | Bunnies (60 FPS) | Percentage |
+| ------------- | ------------- | ------------- | ------------- |
+| Raylib 3.7 | C | 168100 | 100% |
+| Raylib Python CFFI 3.7 | Pypy 3.7 | 33800 | 20% |
+| Raylib Python CFFI 3.7 | Python 3.9 | 7700 | 4.5% |
+| Raylib Python CFFI 3.7 | Python 3.9 Nuitka | 8600 | 5.1% |
+| Raylib Python CFFI 3.7 Dynamic | Python 3.9 | 6300 | 3.7% |
+
+# Packaging your app
+
+You can create a standalone binary using the Nuitka compiler. For example, here is how to package Bunnymark:
+
+ pip3 install nuitka
+ cd examples/textures
+ python3 -m nuitka --onefile --linux-onefile-icon resources/wabbit_alpha.png textures_bunnymark.py
+
+# Advert
+
+[RetroWar: 8-bit Party Battle](https://store.steampowered.com/app/664240/RetroWar_8bit_Party_Battle/?git) is out now. Defeat up to 15 of your friends in a tournament of 80s-inspired retro mini games.
+
+[Coding Games With Pygame Zero & Python](https://github.com/electronstudio/pygame-zero-book) is
+a book for Python beginners.
+
+
+
+%prep
+%autosetup -n raylib-4.2.1.2
+
+%build
+%py3_build
+
+%install
+%py3_install
+install -d -m755 %{buildroot}/%{_pkgdocdir}
+if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
+if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
+if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
+if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
+pushd %{buildroot}
+if [ -d usr/lib ]; then
+ find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/lib64 ]; then
+ find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/bin ]; then
+ find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/sbin ]; then
+ find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+touch doclist.lst
+if [ -d usr/share/man ]; then
+ find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
+fi
+popd
+mv %{buildroot}/filelist.lst .
+mv %{buildroot}/doclist.lst .
+
+%files -n python3-raylib -f filelist.lst
+%dir %{python3_sitearch}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Tue Apr 11 2023 Python_Bot <Python_Bot@openeuler.org> - 4.2.1.2-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..9167dea
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+10949323b89c88e6c0eae9a009651a0a raylib-4.2.1.2.tar.gz