Name: python3-websockets Version: 14.2 Release: 1%{?dist} Summary: An implementation of the WebSocket Protocol (RFC 6455) License: BSD-3-Clause URL: https://github.com/aaugustin/websockets Source0: https://github.com/aaugustin/websockets/archive/%{version}.tar.gz#/websockets-%{version}.tar.gz BuildArch: noarch BuildRequires: python3-devel BuildRequires: python3-pip BuildRequires: python3-pytest BuildRequires: python3-setuptools BuildRequires: python3-wheel BuildRequires: pyproject-rpm-macros %description websockets is a library for developing WebSocket servers and clients in Python. It implements RFC 6455 with a focus on correctness and simplicity. It passes the Autobahn Testsuite. Built on top of Python's asynchronous I/O support introduced in PEP 3156, it provides an API based on coroutines, making it easy to write highly concurrent applications. %prep %autosetup -p1 -n websockets-%{version} %generate_buildrequires %pyproject_buildrequires %build export CFLAGS="%{optflags}" %pyproject_wheel %install %pyproject_install %pyproject_save_files websockets # Remove C source files that shouldn't be installed # rm -f %{buildroot}%{python3_sitearch}/websockets/speedups.c %check # Test execution speed depends on system load and architecture, relax export WEBSOCKETS_TESTS_TIMEOUT_FACTOR=50 # Disable flaky tests donttest="test_close_waits_for_close_frame" # Disable broken tests with openssl 3.2 and python < 3.11 donttest+=" or test_reject_invalid_server_certificate" %ifarch s390x # Skip flaky tests on s390x donttest+=" or test_context_takeover" donttest+=" or test_decompress_max_size" donttest+=" or test_encode_decode_fragmented_binary_frame" donttest+=" or test_encode_decode_fragmented_text_frame" donttest+=" or test_remote_no_context_takeove" donttest+=" or test_writing_in_send_context_fails" %endif %pytest -v -k "not ($donttest)" tests %files -f %{pyproject_files} %license LICENSE %doc README.rst %{python3_sitearch}/websockets/ %{python3_sitearch}/websockets-%{version}.dist-info/ %changelog * Sun Jul 27 2025 Anirban Mitra - 14.2-1 - Converted from SUSE spec to Fedora spec format - Update to version 14.2 - Use pyproject-rpm-macros for modern Python packaging - Added support for various architectures with appropriate test exclusions