# Maintainer: Filipe LaĆns (FFY00) <lains@archlinux.org>
# Maintainer: Carl Smedstad <carsme@archlinux.org>
# Contributor: Felix Yan <felixonmars@archlinux.org>
pkgname=python-jeepney
pkgver=0.9.0
_pkgver=${pkgver%.0}
pkgrel=2
pkgdesc="Low-level, pure Python DBus protocol wrapper"
arch=('any')
url="https://gitlab.com/takluyver/jeepney"
license=('MIT')
depends=('python')
makedepends=(
'git'
'python-build'
'python-flit-core'
'python-installer'
'python-wheel'
)
#checkdepends=(
# 'python-pytest'
# 'python-pytest-asyncio'
# 'python-pytest-trio'
# 'python-testpath'
# 'python-trio'
#)
optdepends=('python-trio: support D-Bus applications with Trio')
source=("git+$url.git#tag=$_pkgver")
sha512sums=('9a52439e1660c93ad1e47f76fea351c25dcb90c209b99044abefeb2e5228c3521d7d3ce12768081e2f1ed8428549032b8b13ebef50154bb8b1c8638df1671d7a')
build() {
cd ${pkgname#python-}
python -m build --wheel --no-isolation
}
#check() {
# cd ${pkgname#python-}
# pytest
#}
package() {
cd ${pkgname#python-}
python -m installer --destdir="$pkgdir" dist/*.whl
# Do not install tests
local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
rm -vr "$pkgdir/$site_packages/jeepney/tests"
rm -vr "$pkgdir/$site_packages/jeepney/io/tests"
install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE
}