2017-09-08 18:35:22 +00:00
#
# spec file for package python-websockets
#
2023-04-21 13:28:15 +00:00
# Copyright (c) 2023 SUSE LLC
2017-09-08 18:35:22 +00:00
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
2018-09-24 07:35:33 +00:00
# Please submit bugfixes or comments via https://bugs.opensuse.org/
2018-06-27 11:03:33 +00:00
#
2017-09-08 18:35:22 +00:00
2023-04-21 13:28:15 +00:00
%{?sle15_python_module_pythons}
2017-09-08 18:35:22 +00:00
Name : python-websockets
2023-05-14 18:45:11 +00:00
Version : 11.0.3
2017-09-08 18:35:22 +00:00
Release : 0
Summary : An implementation of the WebSocket Protocol (RFC 6455)
2018-06-27 11:03:33 +00:00
License : BSD-3-Clause
2017-09-08 18:35:22 +00:00
Group : Development/Languages/Python
2018-08-29 11:42:56 +00:00
URL : https://github.com/aaugustin/websockets
2019-04-16 11:12:33 +00:00
Source : https://github.com/aaugustin/websockets/archive/%{version} .tar.gz
2023-09-20 16:04:07 +00:00
# PATCH-FIX-UPSTREAM https://github.com/python-websockets/websockets/commit/03d62c97fcafffa5cdbe4bb55b2a8d17a62eca33 Fix server shutdown on Python 3.12.
Patch : py312-shutdown.patch
2021-10-31 22:35:16 +00:00
BuildRequires : %{python_module devel >= 3.7}
2021-08-10 07:52:37 +00:00
BuildRequires : %{python_module pytest}
2017-09-08 18:35:22 +00:00
BuildRequires : %{python_module setuptools}
BuildRequires : fdupes
2018-06-27 11:03:33 +00:00
BuildRequires : python-rpm-macros
2017-09-08 18:35:22 +00:00
%python_subpackages
%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
2021-08-10 07:52:37 +00:00
%autosetup -p1 -n websockets-%{version}
2017-09-08 18:35:22 +00:00
%build
export CFLAGS=" %{optflags} "
%python_build
%install
%python_install
%python_expand %fdupes %{buildroot} %{$python_sitearch}
%check
2017-10-09 00:58:40 +00:00
# Test execution speed depends on BS load and architecture, relax
2021-08-11 09:19:36 +00:00
export WEBSOCKETS_TESTS_TIMEOUT_FACTOR=10
2023-05-24 11:13:16 +00:00
# Disable flaky tests gh#python-websockets/websockets#1322
%pytest_arch -v -k " n o t t e s t _ c l o s e _ w a i t s _ f o r _ c l o s e _ f r a m e " tests
2017-09-08 18:35:22 +00:00
%files %{python_files}
2018-08-29 11:42:56 +00:00
%license LICENSE
%doc README.rst
2017-09-08 18:35:22 +00:00
%{python_sitearch} /websockets
%{python_sitearch} /websockets-%{version} -py*.egg-info
%changelog