blob: 265d79f3d43cca618d311f813adb1ddfe392081a (
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
|
# Maintainer: Martin Rys <https://rys.rs/contact>
pkgname=python-pysdl3
pkgver=0.9.8b9
pkgrel=1
pkgdesc="Python ctypes wrapper around SDL3"
arch=("x86_64")
url="https://github.com/Aermoss/PySDL3"
license=("MIT")
depends=(
"alsa-lib"
"freetype2"
"python-aiohttp"
"python-packaging"
"python-requests"
"sdl3")
makedepends=(
"git"
"python-build"
"python-installer")
optdepends=(
# "sdl3_gfx"
"sdl3_image"
# "sdl3_mixer"
# "sdl3_ttf"
)
#source=("${pkgname}-${pkgver}.tar.gz::https://github.com/Aermoss/PySDL3/archive/refs/tags/v${pkgver}.tar.gz")
source=("${pkgname}-${pkgver}::git+https://github.com/Aermoss/PySDL3.git#tag=v${pkgver}")
sha256sums=('fc5fe64a869f8b2d2bd9f1babac69ab2582055e798039dcfc6695dfd2c8226fc')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
python -m build
# Generate docs and .so files
python -c "import sdl3"
}
package() {
cd "${srcdir}/${pkgname}-${pkgver}"
_PYTHON_VERSION=$(python -c "import sys; print(f'{sys.version_info.major}.{sys.version_info.minor}')")
python -m installer --destdir="${pkgdir}" dist/*.whl
cp -r sdl3/bin "${pkgdir}/usr/lib/python${_PYTHON_VERSION}/site-packages/sdl3/"
cp -r sdl3/__doc__.py "${pkgdir}/usr/lib/python${_PYTHON_VERSION}/site-packages/sdl3/"
install -Dm644 "${srcdir}/${pkgname}-${pkgver}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
|