Skip to content
This repository has been archived by the owner on May 20, 2023. It is now read-only.

Commit

Permalink
upgpkg: python-dbus-next 0.2.3-4: Rebuild against Python 3.11.
Browse files Browse the repository at this point in the history
Remove unnecessary quotes and curly braces.
Disable broken test: altdesktop/python-dbus-next#135
Switch to PEP517.

git-svn-id: file:///srv/repos/svn-community/svn@1442916 9fca08f4-af9d-4005-b8df-a31f2cc04f65
  • Loading branch information
dvzrv authored and svntogit committed Apr 8, 2023
1 parent 48a05af commit ed8c431
Showing 1 changed file with 31 additions and 17 deletions.
48 changes: 31 additions & 17 deletions trunk/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -3,38 +3,52 @@
_name=dbus_next
pkgname=python-dbus-next
pkgver=0.2.3
pkgrel=3
pkgrel=4
pkgdesc="The next great DBus library for Python with asyncio support"
arch=('any')
arch=(any)
url="https://github.com/altdesktop/python-dbus-next"
license=('MIT')
depends=('dbus' 'glib2' 'python')
makedepends=('python-setuptools')
checkdepends=('python-pytest' 'python-pytest-asyncio' 'python-pytest-timeout')
license=(MIT)
depends=(
dbus
python
)
makedepends=(
python-build
python-installer
python-setuptools
python-wheel
)
checkdepends=(
python-pytest
python-pytest-asyncio
python-pytest-timeout
)
# test files missing in pypi sdist tarball: https://github.com/altdesktop/python-dbus-next/issues/94
# source=("https://files.pythonhosted.org/packages/source/${_name::1}/${_name}/${_name}-${pkgver}.tar.gz")
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/altdesktop/${pkgname}/archive/refs/tags/v${pkgver}.tar.gz")
source=($pkgname-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz)
sha512sums=('7836d855c755c8ac6cbbb251ca0cbd2f4df9b573f31b1ea1cab480e47896d36b4cb0d479b2469b0bf0b5c700068361a18874b4a087f73020cdcb4e04a2d7dbe7')
b2sums=('6acc38a05511b3de7e13893d82dd1ecd55f9a6124b4d859574294602b921ff012776c12ddb02e1be437b258c7bd5120a3a9625fc5b06bbbe02915dcc4c14897b')

build() {
cd "$pkgname-$pkgver"
python setup.py build
cd $pkgname-$pkgver
python -m build --wheel --no-isolation
}

check() {
cd "$pkgname-$pkgver"
local pytest_options=(
# https://github.com/altdesktop/python-dbus-next/issues/135
--deselect test/test_tcp_address.py::test_tcp_connection_with_forwarding
)
cd $pkgname-$pkgver
export PYTHONPATH="build:${PYTHONPATH}"

# tests require a dbus session
dbus-run-session -- pytest -v
dbus-run-session -- pytest -v "${pytest_options[@]}"
}

package() {
cd "$pkgname-$pkgver"
python setup.py install --skip-build \
--optimize=1 \
--root="${pkgdir}"
install -vDm 644 {CHANGELOG,README}.md -t "${pkgdir}/usr/share/doc/${pkgname}"
install -vDm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
cd $pkgname-$pkgver
python -m installer --destdir="$pkgdir" dist/*.whl
install -vDm 644 {CHANGELOG,README}.md -t "$pkgdir/usr/share/doc/$pkgname"
install -vDm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
}

0 comments on commit ed8c431

Please sign in to comment.