2021-10-16 10:46:26 +03:00
|
|
|
|
%define pypi_name websockets
|
|
|
|
|
|
|
|
|
|
# gi-find-deps.sh is very slow but is not needed here, it may be installed locally
|
2024-01-29 14:04:51 +00:00
|
|
|
|
#define __typelib_path %{nil}
|
2021-10-16 10:46:26 +03:00
|
|
|
|
|
|
|
|
|
Name: python-%{pypi_name}
|
2024-09-21 19:06:33 +00:00
|
|
|
|
Version: 13.1
|
2024-01-15 13:30:19 +00:00
|
|
|
|
Release: 1
|
2021-10-16 10:46:26 +03:00
|
|
|
|
Summary: An implementation of the WebSocket Protocol for python with asyncio
|
|
|
|
|
License: BSD
|
|
|
|
|
Group: Development/Python
|
|
|
|
|
URL: https://github.com/aaugustin/websockets
|
2024-01-27 21:27:59 +00:00
|
|
|
|
Source0: %{url}/archive/%{version}/%{pypi_name}-%{version}.tar.gz
|
2024-01-29 14:04:51 +00:00
|
|
|
|
Patch0: python-websockets-setup.patch
|
2021-10-16 10:46:26 +03:00
|
|
|
|
BuildRequires: gcc
|
|
|
|
|
|
|
|
|
|
%global _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.
|
|
|
|
|
|
|
|
|
|
%description %{_description}
|
|
|
|
|
|
|
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
2024-01-27 21:27:59 +00:00
|
|
|
|
%package -n python38-%{pypi_name}
|
|
|
|
|
Summary: %{summary}
|
|
|
|
|
BuildRequires: python38-devel
|
|
|
|
|
BuildRequires: python38-setuptools
|
|
|
|
|
# the 10.1 pops up always.
|
|
|
|
|
Obsoletes: python38-%{pypi_name} < %{EVRD}
|
|
|
|
|
|
|
|
|
|
%description -n python38-%{pypi_name}
|
|
|
|
|
%{_description}
|
|
|
|
|
|
|
|
|
|
%files -n python38-%{pypi_name}
|
|
|
|
|
%doc README.rst LICENSE
|
|
|
|
|
%{py38_platsitedir}/%{pypi_name}-%{version}-py%{python38_version}.egg-info
|
|
|
|
|
%{py38_platsitedir}/%{pypi_name}
|
|
|
|
|
|
|
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
|
|
2021-10-16 10:46:26 +03:00
|
|
|
|
%prep
|
2024-01-27 21:27:59 +00:00
|
|
|
|
%setup -qn %{pypi_name}-%{version}
|
2024-01-29 14:04:51 +00:00
|
|
|
|
%patch0 -p1
|
|
|
|
|
|
2021-10-16 10:46:26 +03:00
|
|
|
|
# Remove upstream's egg-info
|
2024-01-29 14:04:51 +00:00
|
|
|
|
#rm -vrf %{pypi_name}.egg-info
|
2021-10-16 10:46:26 +03:00
|
|
|
|
|
2024-01-29 14:04:51 +00:00
|
|
|
|
#cp -a . %{py38dir}
|
2024-01-27 21:27:59 +00:00
|
|
|
|
|
2021-10-16 10:46:26 +03:00
|
|
|
|
%build
|
2024-01-27 21:27:59 +00:00
|
|
|
|
%py38_build
|
|
|
|
|
|
2021-10-16 10:46:26 +03:00
|
|
|
|
%install
|
2024-01-27 21:27:59 +00:00
|
|
|
|
%py38_install
|
|
|
|
|
|
2021-10-16 10:46:26 +03:00
|
|
|
|
# Remove installed C file
|
2024-01-27 21:27:59 +00:00
|
|
|
|
rm -vf %{buildroot}%{py3_platsitedir}/%{pypi_name}/speedups.c %{buildroot}%{py38_platsitedir}/%{pypi_name}/speedups.c
|
2023-04-22 09:07:22 +02:00
|
|
|
|
# zerolenght
|
|
|
|
|
find %{buildroot} -type f -empty -delete
|
2021-10-16 10:46:26 +03:00
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
# Skip tests because they fail on Python 3.8. See: https://github.com/aaugustin/websockets/issues/648
|
|
|
|
|
# WEBSOCKETS_TESTS_TIMEOUT_FACTOR=100 %%{__python3} setup.py test
|
2023-04-22 07:14:54 +00:00
|
|
|
|
# test needs internet connections
|
|
|
|
|
# %%py3_test
|
2023-04-22 09:07:22 +02:00
|
|
|
|
|