Date: Saturday, July 17, 2021 @ 15:21:26 Author: dvzrv Revision: 978365
archrelease: copy trunk to community-x86_64 Added: python-xkbcommon/repos/community-x86_64/ python-xkbcommon/repos/community-x86_64/PKGBUILD (from rev 978364, python-xkbcommon/trunk/PKGBUILD) ----------+ PKGBUILD | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) Copied: python-xkbcommon/repos/community-x86_64/PKGBUILD (from rev 978364, python-xkbcommon/trunk/PKGBUILD) =================================================================== --- community-x86_64/PKGBUILD (rev 0) +++ community-x86_64/PKGBUILD 2021-07-17 15:21:26 UTC (rev 978365) @@ -0,0 +1,48 @@ +# Maintainer: David Runge <dv...@archlinux.org> + +_name=xkbcommon +pkgname=python-xkbcommon +pkgver=0.3 +_commit='62c2d511475a04018cc14f13f660b5f63fd4ec0a' # 0.3 +pkgrel=2 +pkgdesc="Python bindings for libxkbcommon using cffi" +arch=('x86_64') +url="https://github.com/sde1000/python-xkbcommon" +license=('MIT') +depends=('python-cffi' 'libxkbcommon') +makedepends=('git' 'python-setuptools') +checkdepends=('python-pytest') +# sdist tarball on pypi misses tests: https://github.com/sde1000/python-xkbcommon/issues/10 +# sdist tarball on pypi misses LICENSE file: https://github.com/sde1000/python-xkbcommon/issues/11 +# upstream has no tags: https://github.com/sde1000/python-xkbcommon/issues/9 +# source=("https://files.pythonhosted.org/packages/source/${_name::1}/${_name}/${_name}-${pkgver}.tar.gz") +source=("git+https://github.com/sde1000/${pkgname}#commit=${_commit}") +sha512sums=('SKIP') +b2sums=('SKIP') + +prepare() { + cd "$pkgname" +} + +build() { + cd "$pkgname" + python "${_name}/ffi_build.py" + python setup.py build +} + +check() { + local _py_ver=$(python -c 'import sys; print(".".join(map(str, sys.version_info[:2])))') + + cd "$pkgname" + export PYTHONPATH="build/lib.linux-${CARCH}-${_py_ver}:${PYTHONPATH}" + pytest -v +} + +package() { + cd "$pkgname" + python setup.py install --skip-build \ + --optimize=1 \ + --root="${pkgdir}" + install -vDm 644 README.rst -t "${pkgdir}/usr/share/doc/${pkgname}" + install -vDm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}" +}