summaryrefslogtreecommitdiff
path: root/dev-python/websockets
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/websockets')
-rw-r--r--dev-python/websockets/Manifest1
-rw-r--r--dev-python/websockets/websockets-17.3.ebuild61
2 files changed, 62 insertions, 0 deletions
diff --git a/dev-python/websockets/Manifest b/dev-python/websockets/Manifest
index 0821b516bd18..01e0e1b9cb91 100644
--- a/dev-python/websockets/Manifest
+++ b/dev-python/websockets/Manifest
@@ -1,2 +1,3 @@
DIST websockets-17.1.gh.tar.gz 528172 BLAKE2B af60d77c44adc75b11b0fb1a688ea962a51e61dd5686551981d67758a92ed1b46401ed6d7084218f34a860c1394bc813e2b3a3c8098ee93978ab540a17f50405 SHA512 55a6968ae7a9d02db104733422a6e48f712aaea02e8758389b19f27b41e918697a4d7ed7533cc102eac94f4a025ffe7411d9e671ba2ecd69859450f70a1d1bee
DIST websockets-17.2.gh.tar.gz 530290 BLAKE2B 5ae95f12dd3974253607b8e42e3eaafbd1e393b70694413190637423e591a6314fc6cc19294591171fddeeb240ca42d2272e73838744c7c49c0f1a04938bb0c3 SHA512 682e2006873e405885469c50a5babf5c503b1d361fab7a7fb30846563f30a488e884f92444717717c3e8529b69af92c59dfdbdf536e8d27857b41375a278b7ce
+DIST websockets-17.3.gh.tar.gz 532351 BLAKE2B 479d79add99bc901e2d20bac710f16c50aa2451470e00da9e04b3d501eb6956c45f8d85297e10552c24c93fd081de702a71bb4a7edf1b0088145805b08ff215d SHA512 aa39a82d51d40dd036a4642847af3a4653f5e7fbfad36969b7ab383f4b9d95559165243aa0697a351a63539af42503d4cf9e28402ba6a5a2cceb2387354f225d
diff --git a/dev-python/websockets/websockets-17.3.ebuild b/dev-python/websockets/websockets-17.3.ebuild
new file mode 100644
index 000000000000..fa4f27c47d22
--- /dev/null
+++ b/dev-python/websockets/websockets-17.3.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_EXT=1
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{13..14} )
+
+inherit distutils-r1
+
+DESCRIPTION="Library for building WebSocket servers and clients in Python"
+HOMEPAGE="
+ https://websockets.readthedocs.io/
+ https://github.com/python-websockets/websockets/
+ https://pypi.org/project/websockets/
+"
+# tests are missing pypi sdist, as of 16.0
+SRC_URI="
+ https://github.com/python-websockets/websockets/archive/${PV}.tar.gz
+ -> ${P}.gh.tar.gz
+"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+IUSE="+native-extensions"
+
+BDEPEND="
+ test? (
+ dev-python/trio[${PYTHON_USEDEP}]
+ dev-python/werkzeug[${PYTHON_USEDEP}]
+ )
+"
+
+EPYTEST_PLUGINS=()
+EPYTEST_RERUNS=10
+distutils_enable_tests pytest
+
+python_compile() {
+ if use native-extensions && [[ ${EPYTHON} != pypy3 ]] ; then
+ local -x BUILD_EXTENSION=yes
+ else
+ local -x BUILD_EXTENSION=no
+ fi
+
+ distutils-r1_python_compile
+}
+
+python_test() {
+ local EPYTEST_DESELECT=(
+ # requires DNS access
+ # https://bugs.gentoo.org/909567
+ tests/legacy/test_client_server.py::ClientServerTests::test_explicit_host_port
+ tests/legacy/test_client_server.py::SecureClientServerTests::test_explicit_host_port
+ # TODO
+ tests/asyncio/test_server.py::ServerTests::test_close_server_keeps_handlers_running
+ )
+
+ epytest tests --reruns-delay=2
+}