python-websockets/python-websockets.spec

66 lines
1.9 KiB
RPMSpec
Raw Normal View History

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
%define __typelib_path %{nil}
Name: python-%{pypi_name}
Version: 11.0.2
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
Source0: https://github.com/aaugustin/websockets/archive/%{version}/%{pypi_name}-%{version}.tar.gz
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 Pythons 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}
#-------------------------------------------------------------------------
%package -n python3-%{pypi_name}
Summary: %{summary}
BuildRequires: pkgconfig(python-3.11)
BuildRequires: python3egg(setuptools) >= 67.2
2021-10-16 10:46:26 +03:00
%description -n python3-%{pypi_name}
%{_description}
%files -n python3-%{pypi_name}
%license LICENSE
%doc README.rst
%{py3_platsitedir}/%{pypi_name}-%{version}-py%{python3_version}.egg-info
%{py3_platsitedir}/%{pypi_name}
2021-10-16 10:46:26 +03:00
#-------------------------------------------------------------------------
%prep
%autosetup -n %{pypi_name}-%{version} -p1
# Remove upstream's egg-info
rm -vrf %{pypi_name}.egg-info
%build
%py3_build
%install
%py3_install
# Remove installed C file
rm -vf %{buildroot}%{py3_platsitedir}/%{pypi_name}/speedups.c
# 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