upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / python-dbus-next / trunk / PKGBUILD
blobf32ec67dc93e9eadaa9375503a3588179a587f5f
1 # Maintainer: David Runge <dvzrv@archlinux.org>
3 _name=dbus_next
4 pkgname=python-dbus-next
5 pkgver=0.2.3
6 pkgrel=4
7 pkgdesc="The next great DBus library for Python with asyncio support"
8 arch=(any)
9 url="https://github.com/altdesktop/python-dbus-next"
10 license=(MIT)
11 depends=(
12   dbus
13   python
15 makedepends=(
16   python-build
17   python-installer
18   python-setuptools
19   python-wheel
21 checkdepends=(
22   python-pytest
23   python-pytest-asyncio
24   python-pytest-timeout
26 # test files missing in pypi sdist tarball: https://github.com/altdesktop/python-dbus-next/issues/94
27 # source=("https://files.pythonhosted.org/packages/source/${_name::1}/${_name}/${_name}-${pkgver}.tar.gz")
28 source=($pkgname-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz)
29 sha512sums=('7836d855c755c8ac6cbbb251ca0cbd2f4df9b573f31b1ea1cab480e47896d36b4cb0d479b2469b0bf0b5c700068361a18874b4a087f73020cdcb4e04a2d7dbe7')
30 b2sums=('6acc38a05511b3de7e13893d82dd1ecd55f9a6124b4d859574294602b921ff012776c12ddb02e1be437b258c7bd5120a3a9625fc5b06bbbe02915dcc4c14897b')
32 build() {
33   cd $pkgname-$pkgver
34   python -m build --wheel --no-isolation
37 check() {
38   local pytest_options=(
39     # https://github.com/altdesktop/python-dbus-next/issues/135
40     --deselect test/test_tcp_address.py::test_tcp_connection_with_forwarding
41   )
42   cd $pkgname-$pkgver
43   export PYTHONPATH="build:${PYTHONPATH}"
45   # tests require a dbus session
46   dbus-run-session -- pytest -v "${pytest_options[@]}"
49 package() {
50   cd $pkgname-$pkgver
51   python -m installer --destdir="$pkgdir" dist/*.whl
52   install -vDm 644 {CHANGELOG,README}.md -t "$pkgdir/usr/share/doc/$pkgname"
53   install -vDm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"