blob: 96f4aa77971ad8a6ee92cd9de58788ef46f2b5a8 (
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
|
# Maintainer: Luis Martinez <luis dot martinez at disroot dot org>
# Contributor: Maximilian Stahlberg <maximilian.stahlberg tu-berlin de>
# Contributor: Feufochmar <feufochmar dot gd at gmail dot com>
## Cannot use libtcod as dependency; statically linked
pkgname=python-tcod
pkgver=13.8.1
pkgrel=1
pkgdesc='High-performance Python port of libtcod'
arch=('x86_64')
url='https://github.com/libtcod/python-tcod'
license=('BSD')
depends=('python-cffi' 'python-numpy' 'python-typing_extensions' 'sdl2')
makedepends=(
'git' 'python-setuptools' 'python-build' 'python-installer' 'python-wheel'
'python-pytest-runner' 'python-pycparser' 'python-pcpp' 'python-sphinx')
changelog=CHANGELOG.md
source=(
"$pkgname::git+$url#tag=$pkgver?signed"
'libtcod::git+https://github.com/libtcod/libtcod#tag=1.22.3?signed')
sha256sums=('SKIP'
'SKIP')
validpgpkeys=('9EF1E80F3817BC043097A7C15814977902B194CC') # Kyle Benesch @ GitHub
prepare() {
cd "$pkgname"
git submodule init
git config submodule.libtcod.url "$srcdir/libtcod"
git submodule update
sed -i '/setuptools/s/==/>=/' pyproject.toml requirements.txt
}
build() {
cd "$pkgname"
python -m build --wheel --no-isolation
make -C docs man
}
# check() {
# cd "$pkgname-$pkgver"
# local _ver="$(python -c 'import sys; print(".".join(map(str, sys.version_info[:2])))')"
# PYTHONPATH="$PWD/build/lib.linux-$CARCH-$_ver" python setup.py pytest
# }
package() {
cd "$pkgname"
PYTHONHASHSEED=0 python -m installer --destdir="$pkgdir/" dist/*.whl
install -Dm644 docs/_build/man/python-tcod.1 -t "$pkgdir/usr/share/man/man1/"
local _site="$(python -c 'import site; print(site.getsitepackages()[0])')"
install -d "$pkgdir/usr/share/licenses/$pkgname/"
ln -s \
"$_site/tcod-$pkgver.dist-info/LICENSE.txt" \
"$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
|