archrelease: copy trunk to community-any
[ArchLinux/community.git] / python-pywayland / trunk / PKGBUILD
blob4f3890b556c3b23c67a97b816e3c8eb5b3941ebb
1 # Maintainer: David Runge <dvzrv@archlinux.org>
3 _name=pywayland
4 pkgname=python-pywayland
5 pkgver=0.4.15
6 pkgrel=2
7 pkgdesc="Python bindings for the libwayland library"
8 arch=(x86_64)
9 url="https://github.com/flacjacket/pywayland"
10 license=(Apache)
11 depends=(python-cffi wayland)
12 makedepends=(python-build python-installer python-setuptools wayland-protocols python-wheel)
13 checkdepends=(python-pytest)
14 source=(https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz)
15 sha512sums=('56973831b26ebbb53dc5b717129a7184b3d3f7354a62b6176eafa49889c1f46b53398f8e88bb8eb3c1d3068c543f1821532889fee337fc83061234a3ec1b2549')
16 b2sums=('1930e9effd7557fcf257c6b3eefa158d808ea5f19d8a2112e09083d4207d34c9dad50fa2f94d4d12c6afa1bb0753a1ebb8722aa3f601410c4ce9925862e437a5')
18 build() {
19   cd $_name-$pkgver
20   python pywayland/ffi_build.py
21   python -m pywayland.scanner
22   python -m build --wheel --no-isolation
25 check() {
26   local _py_ver="$(python -c 'import sys; print(".".join(map(str, sys.version_info[:2])))')"
28   cd $_name-$pkgver
29   mkdir -vp temp
30   export PYTHONPATH="build/lib.linux-$CARCH-$_py_ver:$PYTHONPATH"
31   export XDG_RUNTIME_DIR="$PWD/temp"
32   pytest -vv
35 package() {
36   cd $_name-$pkgver
37   python -m installer --destdir="$pkgdir" dist/*.whl
38   install -vDm 644 README.rst -t "$pkgdir/usr/share/doc/$pkgname"