Date: Saturday, July 17, 2021 @ 15:43:05 Author: dvzrv Revision: 978393
archrelease: copy trunk to community-x86_64 Added: python-pywlroots/repos/community-x86_64/ python-pywlroots/repos/community-x86_64/PKGBUILD (from rev 978392, python-pywlroots/trunk/PKGBUILD) ----------+ PKGBUILD | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) Copied: python-pywlroots/repos/community-x86_64/PKGBUILD (from rev 978392, python-pywlroots/trunk/PKGBUILD) =================================================================== --- community-x86_64/PKGBUILD (rev 0) +++ community-x86_64/PKGBUILD 2021-07-17 15:43:05 UTC (rev 978393) @@ -0,0 +1,49 @@ +# Maintainer: David Runge <dv...@archlinux.org> + +_name=pywlroots +pkgname=python-pywlroots +pkgver=0.14.2 +pkgrel=2 +pkgdesc="Python binding to the wlroots library using cffi" +arch=('x86_64') +url="https://github.com/flacjacket/pywlroots" +license=('custom:UIUC') +depends=('glibc' 'python-cffi' 'python-pywayland' 'python-xkbcommon' 'wlroots' +'libwlroots.so') +makedepends=('python-setuptools') +checkdepends=('python-pytest') +provides=('pywlroots') +conflicts=('pywlroots') +replaces=('pywlroots') +# tests missing in pypi sdist tarball: https://github.com/flacjacket/pywlroots/issues/49 +# source=("https://files.pythonhosted.org/packages/source/${_name::1}/${_name}/${_name}-${pkgver}.tar.gz") +source=("${pkgname}-${pkgver}.tar.gz::https://github.com/flacjacket/${_name}/archive/refs/tags/v${pkgver}.tar.gz") +sha512sums=('59ae38da48cf5254fb40012474c2f88c9b9c5491054e386b164dc0f977e7d4ac55594d7af9ca659bb52c1eb0d11cd76d525a6c75186652528efaeb8ab486570e') +b2sums=('a46a60bf7541efedea106ac924093bdbcb2e0d8d2f5dbeb1429f91af656ee52c05c9e00a5b823c147564a0e7e66016c1051dbbd9e59d6b326ac8a81b1ada2340') + +prepare() { + mv -v "${_name}-$pkgver" "$pkgname-$pkgver" +} + +build() { + cd "$pkgname-$pkgver" + python wlroots/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-$pkgver" + export PYTHONPATH="build/lib.linux-${CARCH}-${_py_ver}:${PYTHONPATH}" + pytest -v +} + +package() { + cd "$pkgname-$pkgver" + 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}" +}