summaryrefslogtreecommitdiff
path: root/python-pysdl2-dll.spec
blob: e54a1473fb031fad5f2be22194c7edc21febef1b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
%global _empty_manifest_terminate_build 0
Name:		python-pysdl2-dll
Version:	2.26.5
Release:	1
Summary:	Pre-built SDL2 binaries for PySDL2
License:	Mozilla Public License Version 2.0
URL:		https://github.com/a-hurst/pysdl2-dll
Source0:	https://mirrors.aliyun.com/pypi/web/packages/0f/24/b1c4ba6630095bde6bd21017a677214c6f44fe52af98ac65a4d5df6140e5/pysdl2-dll-2.26.5.tar.gz


%description
2.26.5 | 2.20.0 | 2.6.0 | 2.6.0 | 1.0.4
Note that the mixer and image libraries are pinned at their current versions until their next major release due to a regression in the macOS binaries.
## Installation
You can install the latest version of pysdl2-dll via pip:
```bash
pip install pysdl2-dll # install latest release version
```
## Requirements
At present, the following platforms are supported:
* macOS (10.11+, 64-bit x86)
* macOS (11.0+, 64-bit ARM)
* Windows (32-bit x86)
* Windows (64-bit x86)
* Linux (32-bit x86)
* Linux (64-bit x86)
* Linux (64-bit ARM)
The pysdl2-dll package can be *installed* on platforms other than the ones listed above, but it won't have any effect.
pysdl2-dll requires PySDL2 0.9.7 or later in order to work correctly on macOS, and for PySDL2 to load the binaries automatically when available. To update to the latest PySDL2, you can run:
```bash
pip install -U pysdl2
```
Because the wheels are not built against any specfic version of Python, pysdl2-dll supports all versions and implementations of Python that are supported by PySDL2.
### Linux Requirements
There are currently two versions the Linux wheels: "legacy" wheels based on the `manylinux2014` standard (for 32-bit and 64-bit x86), and "modern" wheels based on the `manylinux_2_28` standard (for 64-bit x86 and 64-bit ARM only). The `manylinux_2_28` SDL2 binaries require a more recent version of Linux, but offer dynamic support for additional features such as native Wayland windowing, Pipewire audio, and Vulkan rendering.
You must have pip 19.3 or newer to install the `manylinux2014` wheels, and pip 20.3 or newer to install the `manylinux_2_28` wheels. Distributions that use musl C instead of glibc (e.g. Alpine Linux) are not supported.
## Usage
If you are using PySDL2 0.9.7 or later, you don't need to do anything special to use the pysdl2-dll binaries in your project: PySDL2 will load them automatically (and print a message indicating such) if they are available. For older versions of PySDL2, you will need to import this module manually in your scripts (`import sdl2dll`) before PySDL2 is imported.
To override pysdl2-dll and use a different set of binaries, you can set the `PYSDL2_DLL_PATH` environment variable to the path of the folder containing the binaries you want to use instead, or alternatively set it to "system" to force PySDL2 to use the system install of SDL2 if available (e.g. SDL2 installed with `brew` on macOS).

%package -n python3-pysdl2-dll
Summary:	Pre-built SDL2 binaries for PySDL2
Provides:	python-pysdl2-dll
BuildRequires:	python3-devel
BuildRequires:	python3-setuptools
BuildRequires:	python3-pip
BuildRequires:	python3-cffi
BuildRequires:	gcc
BuildRequires:	gdb
%description -n python3-pysdl2-dll
2.26.5 | 2.20.0 | 2.6.0 | 2.6.0 | 1.0.4
Note that the mixer and image libraries are pinned at their current versions until their next major release due to a regression in the macOS binaries.
## Installation
You can install the latest version of pysdl2-dll via pip:
```bash
pip install pysdl2-dll # install latest release version
```
## Requirements
At present, the following platforms are supported:
* macOS (10.11+, 64-bit x86)
* macOS (11.0+, 64-bit ARM)
* Windows (32-bit x86)
* Windows (64-bit x86)
* Linux (32-bit x86)
* Linux (64-bit x86)
* Linux (64-bit ARM)
The pysdl2-dll package can be *installed* on platforms other than the ones listed above, but it won't have any effect.
pysdl2-dll requires PySDL2 0.9.7 or later in order to work correctly on macOS, and for PySDL2 to load the binaries automatically when available. To update to the latest PySDL2, you can run:
```bash
pip install -U pysdl2
```
Because the wheels are not built against any specfic version of Python, pysdl2-dll supports all versions and implementations of Python that are supported by PySDL2.
### Linux Requirements
There are currently two versions the Linux wheels: "legacy" wheels based on the `manylinux2014` standard (for 32-bit and 64-bit x86), and "modern" wheels based on the `manylinux_2_28` standard (for 64-bit x86 and 64-bit ARM only). The `manylinux_2_28` SDL2 binaries require a more recent version of Linux, but offer dynamic support for additional features such as native Wayland windowing, Pipewire audio, and Vulkan rendering.
You must have pip 19.3 or newer to install the `manylinux2014` wheels, and pip 20.3 or newer to install the `manylinux_2_28` wheels. Distributions that use musl C instead of glibc (e.g. Alpine Linux) are not supported.
## Usage
If you are using PySDL2 0.9.7 or later, you don't need to do anything special to use the pysdl2-dll binaries in your project: PySDL2 will load them automatically (and print a message indicating such) if they are available. For older versions of PySDL2, you will need to import this module manually in your scripts (`import sdl2dll`) before PySDL2 is imported.
To override pysdl2-dll and use a different set of binaries, you can set the `PYSDL2_DLL_PATH` environment variable to the path of the folder containing the binaries you want to use instead, or alternatively set it to "system" to force PySDL2 to use the system install of SDL2 if available (e.g. SDL2 installed with `brew` on macOS).

%package help
Summary:	Development documents and examples for pysdl2-dll
Provides:	python3-pysdl2-dll-doc
%description help
2.26.5 | 2.20.0 | 2.6.0 | 2.6.0 | 1.0.4
Note that the mixer and image libraries are pinned at their current versions until their next major release due to a regression in the macOS binaries.
## Installation
You can install the latest version of pysdl2-dll via pip:
```bash
pip install pysdl2-dll # install latest release version
```
## Requirements
At present, the following platforms are supported:
* macOS (10.11+, 64-bit x86)
* macOS (11.0+, 64-bit ARM)
* Windows (32-bit x86)
* Windows (64-bit x86)
* Linux (32-bit x86)
* Linux (64-bit x86)
* Linux (64-bit ARM)
The pysdl2-dll package can be *installed* on platforms other than the ones listed above, but it won't have any effect.
pysdl2-dll requires PySDL2 0.9.7 or later in order to work correctly on macOS, and for PySDL2 to load the binaries automatically when available. To update to the latest PySDL2, you can run:
```bash
pip install -U pysdl2
```
Because the wheels are not built against any specfic version of Python, pysdl2-dll supports all versions and implementations of Python that are supported by PySDL2.
### Linux Requirements
There are currently two versions the Linux wheels: "legacy" wheels based on the `manylinux2014` standard (for 32-bit and 64-bit x86), and "modern" wheels based on the `manylinux_2_28` standard (for 64-bit x86 and 64-bit ARM only). The `manylinux_2_28` SDL2 binaries require a more recent version of Linux, but offer dynamic support for additional features such as native Wayland windowing, Pipewire audio, and Vulkan rendering.
You must have pip 19.3 or newer to install the `manylinux2014` wheels, and pip 20.3 or newer to install the `manylinux_2_28` wheels. Distributions that use musl C instead of glibc (e.g. Alpine Linux) are not supported.
## Usage
If you are using PySDL2 0.9.7 or later, you don't need to do anything special to use the pysdl2-dll binaries in your project: PySDL2 will load them automatically (and print a message indicating such) if they are available. For older versions of PySDL2, you will need to import this module manually in your scripts (`import sdl2dll`) before PySDL2 is imported.
To override pysdl2-dll and use a different set of binaries, you can set the `PYSDL2_DLL_PATH` environment variable to the path of the folder containing the binaries you want to use instead, or alternatively set it to "system" to force PySDL2 to use the system install of SDL2 if available (e.g. SDL2 installed with `brew` on macOS).

%prep
%autosetup -n pysdl2-dll-2.26.5

%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-pysdl2-dll -f filelist.lst
%dir %{python3_sitearch}/*

%files help -f doclist.lst
%{_docdir}/*

%changelog
* Thu Jun 08 2023 Python_Bot <Python_Bot@openeuler.org> - 2.26.5-1
- Package Spec generated