aboutsummaryrefslogtreecommitdiffstats
path: root/testing/py3-websockets/APKBUILD
blob: 9d70e0113280901f377e4aea33204178102b8b84 (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
# Contributor: Leo <thinkabit.ukim@gmail.com>
# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=py3-websockets
_pkgname=websockets
pkgver=8.0.2
pkgrel=0
pkgdesc="An implementation of the WebSocket Protocol (RFC 6455)"
options="net"
url="https://websockets.readthedocs.io"
arch="all"
license="BSD-3-Clause"
makedepends="python3-dev py3-setuptools"
source="$pkgname-$pkgver.tar.gz::https://github.com/aaugustin/websockets/archive/$pkgver.tar.gz"
builddir="$srcdir"/$_pkgname-$pkgver

build() {
	python3 setup.py build
}

check() {
	# Test requires loopback module to be enabled
	# which is not in CI
	rm tests/test_client_server.py
	rm tests/test_auth.py
	rm tests/test_protocol.py

	# Fails on CI for aarch64
	# FAIL: test_keepalive_ping_stops_when_connection_closing (tests.test_protocol.ClientTests)
	# AssertionError: False is not true
	case "$CARCH" in
		aarch64) rm tests/test_protocol.py ;;
		armv7) return 0 ;; # Tests are flaky under drone CI
	esac

	python3 setup.py test
}

package() {
	python3 setup.py install --root="$pkgdir" --optimize=1
}

sha512sums="1925bb5a9e9e1c568b330e7443ab39be95393b18d0ed9fec2c6d8836296a405b0f448a3087baf738eed5094ebb9fee5795619e68cde0edfa3673c1797b984779  py3-websockets-8.0.2.tar.gz"