From 5cd6fc29286e7b4c7ad8a10e4919e5684d20d557 Mon Sep 17 00:00:00 2001 From: Mikhail Novosyolov Date: Sat, 16 Oct 2021 10:46:26 +0300 Subject: [PATCH] init (based on Fedora, for yt-dlp) --- .abf.yml | 2 ++ python-websockets.spec | 60 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+) create mode 100644 .abf.yml create mode 100644 python-websockets.spec diff --git a/.abf.yml b/.abf.yml new file mode 100644 index 0000000..f248706 --- /dev/null +++ b/.abf.yml @@ -0,0 +1,2 @@ +sources: + websockets-10.0.tar.gz: afd1ea0733a2b42ffa28467039bf1a611ce0bc75 diff --git a/python-websockets.spec b/python-websockets.spec new file mode 100644 index 0000000..84c7203 --- /dev/null +++ b/python-websockets.spec @@ -0,0 +1,60 @@ +%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: 10.0 +Release: 1 +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 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} + +#------------------------------------------------------------------------- + +%package -n python3-%{pypi_name} +Summary: %{summary} +BuildRequires: python3-devel +BuildRequires: python3-setuptools + +%description -n python3-%{pypi_name} +%{_description} + +%files -n python3-%{pypi_name} +%license LICENSE +%doc README.rst +%{python3_sitearch}/%{pypi_name}-%{version}-py%{python3_version}.egg-info +%{python3_sitearch}/%{pypi_name} + +#------------------------------------------------------------------------- + +%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}%{python3_sitearch}/%{pypi_name}/speedups.c + +%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