Skip to content

Commit

Permalink
community/py3-trio-websocket: fix build with py3-trio>=0.25
Browse files Browse the repository at this point in the history
  • Loading branch information
sertonix authored and omni committed Sep 26, 2024
1 parent b31d35d commit 22c3e57
Show file tree
Hide file tree
Showing 2 changed files with 387 additions and 16 deletions.
23 changes: 7 additions & 16 deletions community/py3-trio-websocket/APKBUILD
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
# Maintainer: Hoang Nguyen <[email protected]>
pkgname=py3-trio-websocket
pkgver=0.11.1
pkgrel=1
pkgrel=2
pkgdesc="WebSocket client and server implementation for py3-trio"
url="https://github.com/python-trio/trio-websocket"
# disable due to issues with py3-trio>=0.25
# https://github.com/python-trio/trio-websocket/issues/187
#arch="noarch"
arch="noarch"
license="MIT"
depends="
python3
Expand All @@ -25,7 +23,9 @@ checkdepends="
py3-trustme
"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/python-trio/trio-websocket/archive/refs/tags/$pkgver.tar.gz"
source="$pkgname-$pkgver.tar.gz::https://github.com/python-trio/trio-websocket/archive/refs/tags/$pkgver.tar.gz
trio-0.25.patch
"
builddir="$srcdir/${pkgname#py3-}-$pkgver"

build() {
Expand All @@ -35,19 +35,9 @@ build() {
}

check() {
# exception related tests fails with trio >= 0.25
# https://github.com/python-trio/trio-websocket/issues/187
local k="not test_handshake_exception_before_accept"
k="$k and not test_reject_handshake"
k="$k and not test_reject_handshake_invalid_info_status"
k="$k and not test_client_open_timeout"
k="$k and not test_client_close_timeout"
k="$k and not test_client_connect_networking_error"
k="$k and not test_finalization_dropped_exception"

python3 -m venv --clear --without-pip --system-site-packages .testenv
.testenv/bin/python3 -m installer .dist/*.whl
.testenv/bin/python3 -m pytest -k "$k"
.testenv/bin/python3 -m pytest
}

package() {
Expand All @@ -57,4 +47,5 @@ package() {

sha512sums="
4b0eb6f0c012cefedb69b97e9452ba979336fbe9f154799c4c68871b8013e728374e4872a2343ab4d27fa6e25e40c3063e681e80470123d37f13f531be4f6644 py3-trio-websocket-0.11.1.tar.gz
2b592515dd1e9ca8acf96a6ff654d9de1ae37365cb0a3376838ee9b14e58e4ce268f932974960f5e044bea7ab36cded806ad85878ac0231b2c410709bea54b67 trio-0.25.patch
"
Loading

0 comments on commit 22c3e57

Please sign in to comment.