%global pypi_name trio-websocket %global pypi_name_underscore %(echo "%{pypi_name}" | tr '-' '_') Name: python-%{pypi_name} Summary: WebSocket implementation focused on safety and correctness License: MIT Version: 0.10.3 Release: 1%{?dist} URL: https://github.com/HyperionGray/trio-websocket Source: %{url}/archive/%{version}/%{pypi_name}-%{version}.tar.gz # Remove the dependency on python3dist(dependencygroup). # That package is a backport of features built into Python 3.11 and newer. Patch0: no-exceptiongroup-dependency.patch BuildArch: noarch BuildRequires: python3-devel BuildRequires: attr BuildRequires: pytest %global _description %{expand: This library implements both server and client aspects of the the WebSocket protocol, striving for safety, correctness, and ergonomics. It is based on the wsproto project, which is a Sans-IO state machine that implements the majority of the WebSocket protocol, including framing, codecs, and events. This library handles I/O using the Trio framework. This library passes the Autobahn Test Suite. } %description %_description %package -n python3-%{pypi_name} Summary: %{summary} %description -n python3-%{pypi_name} %_description %prep %autosetup -p1 -n %{pypi_name}-%{version} %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install %pyproject_save_files %{pypi_name_underscore} %check %pyproject_check_import # Missing some of the test dependencies, in particular trustme #pytest %files -n python3-%{pypi_name} -f %{pyproject_files} %changelog * Wed Sep 06 2023 Artur Frenszek-Iwicki - 0.10.3-2 - Initial packaging