libretro.py 0.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.
- libretro_py-0.0.0/CHANGELOG.md +12 -0
- libretro_py-0.0.0/LICENSE +21 -0
- libretro_py-0.0.0/MANIFEST.in +1 -0
- libretro_py-0.0.0/PKG-INFO +150 -0
- libretro_py-0.0.0/README.md +92 -0
- libretro_py-0.0.0/pyproject.toml +92 -0
- libretro_py-0.0.0/setup.cfg +4 -0
- libretro_py-0.0.0/setup.py +16 -0
- libretro_py-0.0.0/src/libretro/__init__.py +6 -0
- libretro_py-0.0.0/src/libretro/_utils.py +388 -0
- libretro_py-0.0.0/src/libretro/api/__init__.py +52 -0
- libretro_py-0.0.0/src/libretro/api/_utils.py +172 -0
- libretro_py-0.0.0/src/libretro/api/audio.py +42 -0
- libretro_py-0.0.0/src/libretro/api/av.py +78 -0
- libretro_py-0.0.0/src/libretro/api/camera.py +80 -0
- libretro_py-0.0.0/src/libretro/api/content.py +457 -0
- libretro_py-0.0.0/src/libretro/api/disk.py +75 -0
- libretro_py-0.0.0/src/libretro/api/environment.py +187 -0
- libretro_py-0.0.0/src/libretro/api/input/__init__.py +7 -0
- libretro_py-0.0.0/src/libretro/api/input/analog.py +106 -0
- libretro_py-0.0.0/src/libretro/api/input/device.py +144 -0
- libretro_py-0.0.0/src/libretro/api/input/joypad.py +130 -0
- libretro_py-0.0.0/src/libretro/api/input/keyboard.py +529 -0
- libretro_py-0.0.0/src/libretro/api/input/lightgun.py +134 -0
- libretro_py-0.0.0/src/libretro/api/input/mouse.py +80 -0
- libretro_py-0.0.0/src/libretro/api/input/pointer.py +35 -0
- libretro_py-0.0.0/src/libretro/api/led.py +17 -0
- libretro_py-0.0.0/src/libretro/api/location.py +40 -0
- libretro_py-0.0.0/src/libretro/api/log.py +58 -0
- libretro_py-0.0.0/src/libretro/api/memory.py +86 -0
- libretro_py-0.0.0/src/libretro/api/message.py +70 -0
- libretro_py-0.0.0/src/libretro/api/microphone.py +77 -0
- libretro_py-0.0.0/src/libretro/api/midi.py +34 -0
- libretro_py-0.0.0/src/libretro/api/netpacket.py +64 -0
- libretro_py-0.0.0/src/libretro/api/options.py +159 -0
- libretro_py-0.0.0/src/libretro/api/perf.py +122 -0
- libretro_py-0.0.0/src/libretro/api/power.py +44 -0
- libretro_py-0.0.0/src/libretro/api/proc.py +29 -0
- libretro_py-0.0.0/src/libretro/api/rumble.py +33 -0
- libretro_py-0.0.0/src/libretro/api/savestate.py +54 -0
- libretro_py-0.0.0/src/libretro/api/sensor.py +118 -0
- libretro_py-0.0.0/src/libretro/api/timing.py +81 -0
- libretro_py-0.0.0/src/libretro/api/user.py +84 -0
- libretro_py-0.0.0/src/libretro/api/vfs.py +220 -0
- libretro_py-0.0.0/src/libretro/api/video/__init__.py +4 -0
- libretro_py-0.0.0/src/libretro/api/video/context.py +89 -0
- libretro_py-0.0.0/src/libretro/api/video/frame.py +107 -0
- libretro_py-0.0.0/src/libretro/api/video/negotiate.py +24 -0
- libretro_py-0.0.0/src/libretro/api/video/render.py +48 -0
- libretro_py-0.0.0/src/libretro/builder.py +772 -0
- libretro_py-0.0.0/src/libretro/core.py +674 -0
- libretro_py-0.0.0/src/libretro/drivers/__init__.py +32 -0
- libretro_py-0.0.0/src/libretro/drivers/audio/__init__.py +7 -0
- libretro_py-0.0.0/src/libretro/drivers/audio/array.py +78 -0
- libretro_py-0.0.0/src/libretro/drivers/audio/driver.py +79 -0
- libretro_py-0.0.0/src/libretro/drivers/audio/wave.py +95 -0
- libretro_py-0.0.0/src/libretro/drivers/camera/__init__.py +2 -0
- libretro_py-0.0.0/src/libretro/drivers/camera/driver.py +106 -0
- libretro_py-0.0.0/src/libretro/drivers/camera/generator.py +65 -0
- libretro_py-0.0.0/src/libretro/drivers/content/__init__.py +6 -0
- libretro_py-0.0.0/src/libretro/drivers/content/driver.py +153 -0
- libretro_py-0.0.0/src/libretro/drivers/content/standard.py +506 -0
- libretro_py-0.0.0/src/libretro/drivers/disk/__init__.py +1 -0
- libretro_py-0.0.0/src/libretro/drivers/disk/driver.py +49 -0
- libretro_py-0.0.0/src/libretro/drivers/environment/__init__.py +9 -0
- libretro_py-0.0.0/src/libretro/drivers/environment/composite.py +1441 -0
- libretro_py-0.0.0/src/libretro/drivers/environment/default.py +292 -0
- libretro_py-0.0.0/src/libretro/drivers/environment/dict.py +52 -0
- libretro_py-0.0.0/src/libretro/drivers/environment/driver.py +339 -0
- libretro_py-0.0.0/src/libretro/drivers/input/__init__.py +2 -0
- libretro_py-0.0.0/src/libretro/drivers/input/driver.py +122 -0
- libretro_py-0.0.0/src/libretro/drivers/input/generator.py +587 -0
- libretro_py-0.0.0/src/libretro/drivers/led/__init__.py +2 -0
- libretro_py-0.0.0/src/libretro/drivers/led/dict.py +20 -0
- libretro_py-0.0.0/src/libretro/drivers/led/driver.py +32 -0
- libretro_py-0.0.0/src/libretro/drivers/location/__init__.py +2 -0
- libretro_py-0.0.0/src/libretro/drivers/location/driver.py +117 -0
- libretro_py-0.0.0/src/libretro/drivers/location/generator.py +67 -0
- libretro_py-0.0.0/src/libretro/drivers/log/__init__.py +2 -0
- libretro_py-0.0.0/src/libretro/drivers/log/driver.py +18 -0
- libretro_py-0.0.0/src/libretro/drivers/log/unformatted.py +34 -0
- libretro_py-0.0.0/src/libretro/drivers/message/__init__.py +2 -0
- libretro_py-0.0.0/src/libretro/drivers/message/driver.py +21 -0
- libretro_py-0.0.0/src/libretro/drivers/message/logger.py +50 -0
- libretro_py-0.0.0/src/libretro/drivers/microphone/__init__.py +2 -0
- libretro_py-0.0.0/src/libretro/drivers/microphone/driver.py +225 -0
- libretro_py-0.0.0/src/libretro/drivers/microphone/generator.py +110 -0
- libretro_py-0.0.0/src/libretro/drivers/midi/__init__.py +2 -0
- libretro_py-0.0.0/src/libretro/drivers/midi/driver.py +79 -0
- libretro_py-0.0.0/src/libretro/drivers/midi/generator.py +76 -0
- libretro_py-0.0.0/src/libretro/drivers/netpacket/__init__.py +2 -0
- libretro_py-0.0.0/src/libretro/drivers/netpacket/driver.py +78 -0
- libretro_py-0.0.0/src/libretro/drivers/netpacket/socket.py +71 -0
- libretro_py-0.0.0/src/libretro/drivers/options/__init__.py +6 -0
- libretro_py-0.0.0/src/libretro/drivers/options/dict.py +305 -0
- libretro_py-0.0.0/src/libretro/drivers/options/driver.py +107 -0
- libretro_py-0.0.0/src/libretro/drivers/path/__init__.py +6 -0
- libretro_py-0.0.0/src/libretro/drivers/path/default.py +97 -0
- libretro_py-0.0.0/src/libretro/drivers/path/driver.py +42 -0
- libretro_py-0.0.0/src/libretro/drivers/perf/__init__.py +2 -0
- libretro_py-0.0.0/src/libretro/drivers/perf/default.py +84 -0
- libretro_py-0.0.0/src/libretro/drivers/perf/driver.py +84 -0
- libretro_py-0.0.0/src/libretro/drivers/power/__init__.py +1 -0
- libretro_py-0.0.0/src/libretro/drivers/power/driver.py +35 -0
- libretro_py-0.0.0/src/libretro/drivers/rumble/__init__.py +2 -0
- libretro_py-0.0.0/src/libretro/drivers/rumble/default.py +58 -0
- libretro_py-0.0.0/src/libretro/drivers/rumble/interface.py +51 -0
- libretro_py-0.0.0/src/libretro/drivers/sensor/__init__.py +2 -0
- libretro_py-0.0.0/src/libretro/drivers/sensor/generator.py +414 -0
- libretro_py-0.0.0/src/libretro/drivers/sensor/interface.py +74 -0
- libretro_py-0.0.0/src/libretro/drivers/timing/__init__.py +2 -0
- libretro_py-0.0.0/src/libretro/drivers/timing/default.py +101 -0
- libretro_py-0.0.0/src/libretro/drivers/timing/driver.py +69 -0
- libretro_py-0.0.0/src/libretro/drivers/user/__init__.py +2 -0
- libretro_py-0.0.0/src/libretro/drivers/user/default.py +55 -0
- libretro_py-0.0.0/src/libretro/drivers/user/driver.py +20 -0
- libretro_py-0.0.0/src/libretro/drivers/vfs/__init__.py +3 -0
- libretro_py-0.0.0/src/libretro/drivers/vfs/default.py +182 -0
- libretro_py-0.0.0/src/libretro/drivers/vfs/history.py +268 -0
- libretro_py-0.0.0/src/libretro/drivers/vfs/interface.py +618 -0
- libretro_py-0.0.0/src/libretro/drivers/video/__init__.py +8 -0
- libretro_py-0.0.0/src/libretro/drivers/video/driver.py +146 -0
- libretro_py-0.0.0/src/libretro/drivers/video/multi.py +113 -0
- libretro_py-0.0.0/src/libretro/drivers/video/opengl/__init__.py +4 -0
- libretro_py-0.0.0/src/libretro/drivers/video/opengl/moderngl.py +195 -0
- libretro_py-0.0.0/src/libretro/drivers/video/software/__init__.py +7 -0
- libretro_py-0.0.0/src/libretro/drivers/video/software/array.py +136 -0
- libretro_py-0.0.0/src/libretro/drivers/video/software/base.py +92 -0
- libretro_py-0.0.0/src/libretro/drivers/video/software/pillow.py +171 -0
- libretro_py-0.0.0/src/libretro/error.py +14 -0
- libretro_py-0.0.0/src/libretro/h.py +5 -0
- libretro_py-0.0.0/src/libretro/session.py +335 -0
- libretro_py-0.0.0/src/libretro.py.egg-info/PKG-INFO +150 -0
- libretro_py-0.0.0/src/libretro.py.egg-info/SOURCES.txt +135 -0
- libretro_py-0.0.0/src/libretro.py.egg-info/dependency_links.txt +1 -0
- libretro_py-0.0.0/src/libretro.py.egg-info/requires.txt +34 -0
- libretro_py-0.0.0/src/libretro.py.egg-info/top_level.txt +1 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [0.0.0] - 2024-04-11
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- Everything.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Jesse Talavera
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
include CHANGELOG.md
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: libretro.py
|
|
3
|
+
Version: 0.0.0
|
|
4
|
+
Summary: A libretro frontend for Python intended for testing cores.
|
|
5
|
+
Author-email: Jesse Talavera <jesse@jesse.tg>
|
|
6
|
+
Maintainer-email: Jesse Talavera <jesse@jesse.tg>
|
|
7
|
+
License: MIT License
|
|
8
|
+
Project-URL: Homepage, https://github.com/JesseTG/libretro.py
|
|
9
|
+
Project-URL: Issues, https://github.com/JesseTG/libretro.py/issues
|
|
10
|
+
Project-URL: Repository, https://github.com/JesseTG/libretro.py
|
|
11
|
+
Project-URL: Changelog, https://github.com/JesseTG/libretro.py/blob/master/CHANGELOG.md
|
|
12
|
+
Keywords: libretro,retroarch,emulation,testing,retrogaming
|
|
13
|
+
Classifier: Development Status :: 3 - Alpha
|
|
14
|
+
Classifier: Environment :: Console
|
|
15
|
+
Classifier: Environment :: Console :: Framebuffer
|
|
16
|
+
Classifier: Intended Audience :: Developers
|
|
17
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
18
|
+
Classifier: Natural Language :: English
|
|
19
|
+
Classifier: Operating System :: MacOS
|
|
20
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
21
|
+
Classifier: Operating System :: POSIX
|
|
22
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
23
|
+
Classifier: Programming Language :: C
|
|
24
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
25
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
26
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
27
|
+
Classifier: Topic :: Games/Entertainment
|
|
28
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
29
|
+
Classifier: Topic :: Software Development :: Testing
|
|
30
|
+
Requires-Python: >=3.10
|
|
31
|
+
Description-Content-Type: text/markdown
|
|
32
|
+
License-File: LICENSE
|
|
33
|
+
Requires-Dist: typing_extensions==4.*; python_version == "3.10"
|
|
34
|
+
Provides-Extra: build
|
|
35
|
+
Requires-Dist: build==1.2.1; extra == "build"
|
|
36
|
+
Requires-Dist: setuptools>=69.1.1; extra == "build"
|
|
37
|
+
Requires-Dist: twine==5.0.0; extra == "build"
|
|
38
|
+
Provides-Extra: dev
|
|
39
|
+
Requires-Dist: bandit==1.7.*; extra == "dev"
|
|
40
|
+
Requires-Dist: black==23.*; extra == "dev"
|
|
41
|
+
Requires-Dist: flake8==6.*; extra == "dev"
|
|
42
|
+
Requires-Dist: isort==5.*; extra == "dev"
|
|
43
|
+
Requires-Dist: mypy==1.5.*; extra == "dev"
|
|
44
|
+
Requires-Dist: libretro.py[build]; extra == "dev"
|
|
45
|
+
Provides-Extra: docs
|
|
46
|
+
Requires-Dist: Sphinx==7.*; extra == "docs"
|
|
47
|
+
Requires-Dist: sphinx-autobuild==2024.*; extra == "docs"
|
|
48
|
+
Requires-Dist: furo; extra == "docs"
|
|
49
|
+
Provides-Extra: doc
|
|
50
|
+
Requires-Dist: libretro.py[docs]; extra == "doc"
|
|
51
|
+
Provides-Extra: opengl
|
|
52
|
+
Requires-Dist: moderngl==5.10.*; extra == "opengl"
|
|
53
|
+
Provides-Extra: pillow
|
|
54
|
+
Requires-Dist: pillow==10.2.*; extra == "pillow"
|
|
55
|
+
Requires-Dist: types-Pillow; extra == "pillow"
|
|
56
|
+
Provides-Extra: all
|
|
57
|
+
Requires-Dist: libretro.py[build,dev,docs,opengl,pillow]; extra == "all"
|
|
58
|
+
|
|
59
|
+
# libretro.py
|
|
60
|
+
|
|
61
|
+
A Python binding for [libretro][libretro] intended for testing cores,
|
|
62
|
+
but suitable for any purpose.
|
|
63
|
+
Ease of use, flexibility, and complete API support are top priorities.
|
|
64
|
+
|
|
65
|
+
<div align="center">
|
|
66
|
+
|
|
67
|
+
[](https://github.com/JesseTG/libretro.py/actions)
|
|
68
|
+
[](https://pypi.org/project/PROJECT_NAME_URL)
|
|
69
|
+
[](LICENSE)
|
|
70
|
+
|
|
71
|
+
</div>
|
|
72
|
+
|
|
73
|
+
# Supported Environments
|
|
74
|
+
|
|
75
|
+
libretro.py has the following requirements:
|
|
76
|
+
|
|
77
|
+
- Python 3.10 or newer.
|
|
78
|
+
May not work on alternative Python implementations like PyPy.
|
|
79
|
+
- Supported on Windows, macOS, and Linux.
|
|
80
|
+
May work on other platforms, but no promises.
|
|
81
|
+
|
|
82
|
+
Nothing else is required for most functionality,
|
|
83
|
+
but some [extra features](#extras) have additional dependencies or constraints.
|
|
84
|
+
|
|
85
|
+
If contributing then [`just`][just] is optional but recommended,
|
|
86
|
+
as it will simplify most development tasks.
|
|
87
|
+
For details, run `just` (no arguments) in the project root.
|
|
88
|
+
|
|
89
|
+
# Installing
|
|
90
|
+
|
|
91
|
+
libretro.py supports **Python 3.10 or newer**.
|
|
92
|
+
Nothing else is required for most functionality,
|
|
93
|
+
but some extra features have additional dependencies.
|
|
94
|
+
|
|
95
|
+
You can install libretro.py with `pip` like so:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
# Install the base libretro.py
|
|
99
|
+
pip install libretro.py
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Using a virtual environment is recommended:
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
# Create a virtual environment
|
|
106
|
+
python -m venv ./venv
|
|
107
|
+
|
|
108
|
+
# Activate the virtual environment (in Bash)
|
|
109
|
+
source ./venv/bin/activate
|
|
110
|
+
|
|
111
|
+
# Activate the virtual environment (in PowerShell)
|
|
112
|
+
./venv/Scripts/activate.ps1
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
Or if you have [`just`][just] installed, let it figure out the details for you:
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
just venv
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## Extras
|
|
122
|
+
|
|
123
|
+
To install additional features,
|
|
124
|
+
add one or more of the following extras to the `install` command:
|
|
125
|
+
|
|
126
|
+
- **`dev`:** Assorted tools used to help develop libretro.py.
|
|
127
|
+
Required if contributing to libretro.py.
|
|
128
|
+
- **`opengl`:** Support for the built-in OpenGL video driver.
|
|
129
|
+
Required if testing a core's OpenGL support.
|
|
130
|
+
- **`pillow`:** Support for the built-in software-only video driver
|
|
131
|
+
powered by the [Pillow][pillow] image processing library.
|
|
132
|
+
Not required for any particular feature,
|
|
133
|
+
but it simplifies tests that inspect the core's video output.
|
|
134
|
+
|
|
135
|
+
For example, if you want to submit an improvement to the Pillow video driver,
|
|
136
|
+
you would install libretro.py like so:
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
pip install libretro.py[pillow,dev]
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
And if you just want to test your libretro core's OpenGL support:
|
|
143
|
+
|
|
144
|
+
```bash
|
|
145
|
+
pip install libretro.py[opengl]
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
[just]: https://just.systems
|
|
149
|
+
[libretro]: https://www.libretro.com
|
|
150
|
+
[pillow]: https://python-pillow.org
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# libretro.py
|
|
2
|
+
|
|
3
|
+
A Python binding for [libretro][libretro] intended for testing cores,
|
|
4
|
+
but suitable for any purpose.
|
|
5
|
+
Ease of use, flexibility, and complete API support are top priorities.
|
|
6
|
+
|
|
7
|
+
<div align="center">
|
|
8
|
+
|
|
9
|
+
[](https://github.com/JesseTG/libretro.py/actions)
|
|
10
|
+
[](https://pypi.org/project/PROJECT_NAME_URL)
|
|
11
|
+
[](LICENSE)
|
|
12
|
+
|
|
13
|
+
</div>
|
|
14
|
+
|
|
15
|
+
# Supported Environments
|
|
16
|
+
|
|
17
|
+
libretro.py has the following requirements:
|
|
18
|
+
|
|
19
|
+
- Python 3.10 or newer.
|
|
20
|
+
May not work on alternative Python implementations like PyPy.
|
|
21
|
+
- Supported on Windows, macOS, and Linux.
|
|
22
|
+
May work on other platforms, but no promises.
|
|
23
|
+
|
|
24
|
+
Nothing else is required for most functionality,
|
|
25
|
+
but some [extra features](#extras) have additional dependencies or constraints.
|
|
26
|
+
|
|
27
|
+
If contributing then [`just`][just] is optional but recommended,
|
|
28
|
+
as it will simplify most development tasks.
|
|
29
|
+
For details, run `just` (no arguments) in the project root.
|
|
30
|
+
|
|
31
|
+
# Installing
|
|
32
|
+
|
|
33
|
+
libretro.py supports **Python 3.10 or newer**.
|
|
34
|
+
Nothing else is required for most functionality,
|
|
35
|
+
but some extra features have additional dependencies.
|
|
36
|
+
|
|
37
|
+
You can install libretro.py with `pip` like so:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
# Install the base libretro.py
|
|
41
|
+
pip install libretro.py
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Using a virtual environment is recommended:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
# Create a virtual environment
|
|
48
|
+
python -m venv ./venv
|
|
49
|
+
|
|
50
|
+
# Activate the virtual environment (in Bash)
|
|
51
|
+
source ./venv/bin/activate
|
|
52
|
+
|
|
53
|
+
# Activate the virtual environment (in PowerShell)
|
|
54
|
+
./venv/Scripts/activate.ps1
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Or if you have [`just`][just] installed, let it figure out the details for you:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
just venv
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## Extras
|
|
64
|
+
|
|
65
|
+
To install additional features,
|
|
66
|
+
add one or more of the following extras to the `install` command:
|
|
67
|
+
|
|
68
|
+
- **`dev`:** Assorted tools used to help develop libretro.py.
|
|
69
|
+
Required if contributing to libretro.py.
|
|
70
|
+
- **`opengl`:** Support for the built-in OpenGL video driver.
|
|
71
|
+
Required if testing a core's OpenGL support.
|
|
72
|
+
- **`pillow`:** Support for the built-in software-only video driver
|
|
73
|
+
powered by the [Pillow][pillow] image processing library.
|
|
74
|
+
Not required for any particular feature,
|
|
75
|
+
but it simplifies tests that inspect the core's video output.
|
|
76
|
+
|
|
77
|
+
For example, if you want to submit an improvement to the Pillow video driver,
|
|
78
|
+
you would install libretro.py like so:
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
pip install libretro.py[pillow,dev]
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
And if you just want to test your libretro core's OpenGL support:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
pip install libretro.py[opengl]
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
[just]: https://just.systems
|
|
91
|
+
[libretro]: https://www.libretro.com
|
|
92
|
+
[pillow]: https://python-pillow.org
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "libretro.py"
|
|
3
|
+
dynamic = ["version"]
|
|
4
|
+
description = "A libretro frontend for Python intended for testing cores."
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
requires-python = ">=3.10"
|
|
7
|
+
license = {text = "MIT License"}
|
|
8
|
+
authors = [
|
|
9
|
+
{name = "Jesse Talavera", email = "jesse@jesse.tg"},
|
|
10
|
+
]
|
|
11
|
+
maintainers = [
|
|
12
|
+
{name = "Jesse Talavera", email = "jesse@jesse.tg"},
|
|
13
|
+
]
|
|
14
|
+
classifiers = [
|
|
15
|
+
"Development Status :: 3 - Alpha",
|
|
16
|
+
"Environment :: Console",
|
|
17
|
+
"Environment :: Console :: Framebuffer",
|
|
18
|
+
"Intended Audience :: Developers",
|
|
19
|
+
"License :: OSI Approved :: MIT License",
|
|
20
|
+
"Natural Language :: English",
|
|
21
|
+
"Operating System :: MacOS",
|
|
22
|
+
"Operating System :: Microsoft :: Windows",
|
|
23
|
+
"Operating System :: POSIX",
|
|
24
|
+
"Operating System :: POSIX :: Linux",
|
|
25
|
+
"Programming Language :: C",
|
|
26
|
+
"Programming Language :: Python :: 3.10",
|
|
27
|
+
"Programming Language :: Python :: 3.11",
|
|
28
|
+
"Programming Language :: Python :: 3.12",
|
|
29
|
+
"Topic :: Games/Entertainment",
|
|
30
|
+
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
31
|
+
"Topic :: Software Development :: Testing",
|
|
32
|
+
]
|
|
33
|
+
keywords = ["libretro", "retroarch", "emulation", "testing", "retrogaming"]
|
|
34
|
+
dependencies = [
|
|
35
|
+
"typing_extensions == 4.*; python_version == '3.10'",
|
|
36
|
+
]
|
|
37
|
+
|
|
38
|
+
[project.optional-dependencies]
|
|
39
|
+
build = [
|
|
40
|
+
'build == 1.2.1',
|
|
41
|
+
'setuptools>=69.1.1',
|
|
42
|
+
'twine == 5.0.0',
|
|
43
|
+
]
|
|
44
|
+
dev = [
|
|
45
|
+
'bandit == 1.7.*',
|
|
46
|
+
'black == 23.*',
|
|
47
|
+
'flake8 == 6.*',
|
|
48
|
+
'isort == 5.*',
|
|
49
|
+
'mypy == 1.5.*',
|
|
50
|
+
"libretro.py[build]"
|
|
51
|
+
]
|
|
52
|
+
docs = [
|
|
53
|
+
'Sphinx == 7.*',
|
|
54
|
+
'sphinx-autobuild == 2024.*',
|
|
55
|
+
'furo',
|
|
56
|
+
]
|
|
57
|
+
doc = ["libretro.py[docs]"] # Alias for the docs extra
|
|
58
|
+
opengl = [
|
|
59
|
+
'moderngl == 5.10.*',
|
|
60
|
+
]
|
|
61
|
+
pillow = [
|
|
62
|
+
'pillow == 10.2.*',
|
|
63
|
+
'types-Pillow',
|
|
64
|
+
]
|
|
65
|
+
all = ["libretro.py[build,dev,docs,opengl,pillow]"]
|
|
66
|
+
|
|
67
|
+
[project.urls]
|
|
68
|
+
Homepage = "https://github.com/JesseTG/libretro.py"
|
|
69
|
+
Issues = "https://github.com/JesseTG/libretro.py/issues"
|
|
70
|
+
Repository = "https://github.com/JesseTG/libretro.py"
|
|
71
|
+
Changelog = "https://github.com/JesseTG/libretro.py/blob/master/CHANGELOG.md"
|
|
72
|
+
|
|
73
|
+
[build-system]
|
|
74
|
+
requires = [
|
|
75
|
+
'build == 1.2.1',
|
|
76
|
+
'setuptools>=69.1.1',
|
|
77
|
+
'twine == 5.0.0',
|
|
78
|
+
]
|
|
79
|
+
build-backend = "setuptools.build_meta"
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
[tool.black]
|
|
85
|
+
line-length = 99
|
|
86
|
+
|
|
87
|
+
[tool.bandit]
|
|
88
|
+
# Don't flag asserts
|
|
89
|
+
skips = ["B101"]
|
|
90
|
+
|
|
91
|
+
[tool.isort]
|
|
92
|
+
profile = "black"
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
from os.path import join, dirname
|
|
2
|
+
import re
|
|
3
|
+
import setuptools
|
|
4
|
+
|
|
5
|
+
with open(join(dirname(__file__), "CHANGELOG.md"), "r") as file:
|
|
6
|
+
changelog = file.read()
|
|
7
|
+
|
|
8
|
+
# We fetch the version number from CHANGELOG.md
|
|
9
|
+
# so that we don't have to maintain it in multiple places.
|
|
10
|
+
match = re.search(r"## \[(?P<version>\d+\.\d+\.\d+)]", changelog, re.MULTILINE)
|
|
11
|
+
if not match:
|
|
12
|
+
raise ValueError("Could not find the latest version in CHANGELOG.md")
|
|
13
|
+
|
|
14
|
+
version = match["version"]
|
|
15
|
+
|
|
16
|
+
setuptools.setup(version=version)
|