blob: 5bbff960e6ab92f43b0c6999ad9f49ff8d93176b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
# Maintainer: Carl Smedstad <carl.smedstad at protonmail dot com>
pkgname=python-httpx-sse
_name=${pkgname#python-}
pkgver=0.4.0
pkgrel=2
pkgdesc="Consume Server-Sent Event (SSE) messages with HTTPX"
arch=(any)
url="https://github.com/florimondmanca/httpx-sse"
license=(MIT)
depends=(
python
python-httpx
)
makedepends=(
python-build
python-installer
python-setuptools-scm
python-wheel
)
checkdepends=(
python-pytest
python-pytest-asyncio
python-sse-starlette
)
source=("$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/$pkgver.tar.gz")
sha256sums=('3c0a5eb3ddb855e99d3e5c8c86c524bbc5dbca71225769c6a19ee9456ebd8c52')
_archive="$_name-$pkgver"
build() {
cd "$_archive"
python -m build --wheel --no-isolation
}
check() {
cd "$_archive"
rm -rf tmp_install
python -m installer --destdir=tmp_install dist/*.whl
_site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
export PYTHONPATH="$PWD/tmp_install/$_site_packages"
pytest --override-ini="addopts="
}
package() {
cd "$_archive"
python -m installer --destdir="$pkgdir" dist/*.whl
install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE
}
|