| 1 | # Contributor: Sam Whited <[email protected]> |
| 2 | # Contributor: Celeste <[email protected]> |
| 3 | maintainer="Hugo Osvaldo Barrera <[email protected]>" |
| 4 | pkgname=py3-slixmpp |
| 5 | _pkgname=slixmpp |
| 6 | pkgver=1.17.0 |
| 7 | pkgrel=0 |
| 8 | pkgdesc="Fork of the SleekXMPP XMPP library for async IO and Python 3.7+" |
| 9 | url="https://slixmpp.readthedocs.io/en/latest/" |
| 10 | arch="all" |
| 11 | license="MIT" |
| 12 | depends=" |
| 13 | py3-aiodns |
| 14 | py3-aiohttp |
| 15 | py3-asn1 |
| 16 | py3-asn1-modules |
| 17 | py3-cryptography |
| 18 | py3-defusedxml |
| 19 | py3-emoji |
| 20 | " |
| 21 | makedepends=" |
| 22 | py3-gpep517 |
| 23 | py3-setuptools |
| 24 | py3-setuptools-rust |
| 25 | py3-setuptools_scm |
| 26 | py3-wheel |
| 27 | " |
| 28 | checkdepends=" |
| 29 | cmd:gpg |
| 30 | " |
| 31 | subpackages=" |
| 32 | $pkgname-doc |
| 33 | $pkgname-pyc |
| 34 | " |
| 35 | source="https://files.pythonhosted.org/packages/source/s/slixmpp/slixmpp-$pkgver.tar.gz |
| 36 | 4b6d2b8c6da0e77c153804b6b3beeb54254a2a72.patch |
| 37 | " |
| 38 | builddir="$srcdir/$_pkgname-$pkgver" |
| 39 | options="net" # cargo fetch |
| 40 | |
| 41 | # secfixes: |
| 42 | # 1.8.3-r0: |
| 43 | # - CVE-2022-45197 |
| 44 | |
| 45 | prepare() { |
| 46 | default_prepare |
| 47 | cargo fetch --locked |
| 48 | } |
| 49 | |
| 50 | build() { |
| 51 | export CARGO_NET_OFFLINE=true |
| 52 | gpep517 build-wheel --wheel-dir .dist --output-fd 3 3>&1 |
| 53 | } |
| 54 | |
| 55 | check() { |
| 56 | python3 -m venv --clear --without-pip --system-site-packages .testenv |
| 57 | .testenv/bin/python3 -m installer .dist/*.whl |
| 58 | .testenv/bin/python3 run_tests.py |
| 59 | |
| 60 | # ensure the rust extensions is present (failures are silently ignored) |
| 61 | ls build/lib.linux-*-cpython-314/slixmpp/jid.cpython-*.so |
| 62 | } |
| 63 | |
| 64 | package() { |
| 65 | python3 -m installer -d "$pkgdir" .dist/*.whl |
| 66 | |
| 67 | install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/ |
| 68 | install -Dm644 README.rst -t "$pkgdir"/usr/share/doc/$pkgname/ |
| 69 | } |
| 70 | |
| 71 | sha512sums=" |
| 72 | 0fb77e9aa5a857f703dc797731d03392ca56ef2120372836d2d0979b730a48d6e0c5e50234dbbf5f0e95cfca42228fe854c033bc4be53f50e65910d14a300771 slixmpp-1.17.0.tar.gz |
| 73 | 59b881d80f3364dbced81213b4fe175cc895ccf1cbdcc855271a0d8e50b57194ebffd29b8cb90ea057b2b3bad45c2f7530ece8e5327fb907b7246232cf647c49 4b6d2b8c6da0e77c153804b6b3beeb54254a2a72.patch |
| 74 | " |