upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / python-pydle / repos / community-any / PKGBUILD
blob1b81be43b8004230d1bc06f5b7f4641c06448e6f
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
3 pkgname=python-pydle
4 pkgver=1.0.0
5 pkgrel=2
6 pkgdesc="A compact, flexible and standards-abiding IRC library"
7 url="https://github.com/Shizmob/pydle"
8 license=('BSD')
9 arch=('any')
10 depends=('python')
11 makedepends=('python-build' 'python-installer' 'python-poetry-core')
12 optdepends=('python-pure-sasl: for SASL support')
13 checkdepends=('python-pytest-asyncio' 'python-pure-sasl')
14 source=("https://github.com/Shizmob/pydle/archive/v$pkgver/$pkgname-$pkgver.tar.gz"
15         "fix-python-dependencies.patch")
16 sha512sums=('0d9e2e04b5043a514651211a57d7078f220c01a39719ee5b00117006176576900cc689e21ea1440498a879e7b336d6d76a302265e2eccd98517e1b82dd536b31'
17             'c9523de9ded3051eee2272f8fccf858d24ae77a28d0fc2a648b086eab59179dd0318de49f6f39c72da28f9ee50d8a80c3c4690cee9fa2e9efbd325ff9e4ece96')
19 prepare() {
20   cd pydle-$pkgver
21   # https://github.com/Shizmob/pydle/issues/162
22   sed -i '/loop=self.eventloop/d' pydle/connection.py
24   patch -Np1 -i ${srcdir}/fix-python-dependencies.patch
27 build() {
28   cd pydle-$pkgver
29   python -m build -nw
32 check() {
33   cd pydle-$pkgver
34   # https://github.com/Shizmob/pydle/issues/78
35   pytest || echo "Tests failed"
38 package() {
39   cd pydle-$pkgver
40   python -m installer --destdir="$pkgdir" dist/*.whl
41   install -Dm644 LICENSE.md -t "$pkgdir"/usr/share/licenses/$pkgname/