This commit is contained in:
Sergey Zhemoytel 2024-01-29 14:04:51 +00:00
parent 850eb341cc
commit d74ba041bf
3 changed files with 41 additions and 30 deletions

View file

@ -1,2 +1,2 @@
sources: sources:
websockets-7.0.tar.gz: 7f2823a1f004c3f0a7e762dcf4bd83ee49f589aa websockets-12.0.tar.gz: 4cf2561bba8bb7bae862706eca7d5e378fe7b0c6

View file

@ -0,0 +1,32 @@
diff --git a/setup.py.orig b/setup.py
index ae0aaa6..f286273 100644
--- a/setup.py.orig
+++ b/setup.py
@@ -32,7 +32,27 @@ else:
# Static values are declared in pyproject.toml.
setuptools.setup(
+ name='websockets',
version=version,
long_description=long_description,
ext_modules=ext_modules,
+ url='https://github.com/python-websockets/websockets',
+ author='Aymeric Augustin',
+ author_email='aymeric.augustin@m4x.org',
+ license='BSD',
+ classifiers=[
+ 'Development Status :: 5 - Production/Stable',
+ 'Environment :: Web Environment',
+ 'Intended Audience :: Developers',
+ 'License :: OSI Approved :: BSD License',
+ 'Operating System :: OS Independent',
+ 'Programming Language :: Python',
+ 'Programming Language :: Python :: 3',
+ 'Programming Language :: Python :: 3.8',
+ 'Programming Language :: Python :: 3.9',
+ 'Programming Language :: Python :: 3.10',
+ 'Programming Language :: Python :: 3.11',
+ ],
+ python_requires='>=3.8',
+ test_loader='unittest:TestLoader',
)

View file

@ -1,16 +1,17 @@
%define pypi_name websockets %define pypi_name websockets
# gi-find-deps.sh is very slow but is not needed here, it may be installed locally # gi-find-deps.sh is very slow but is not needed here, it may be installed locally
%define __typelib_path %{nil} #define __typelib_path %{nil}
Name: python-%{pypi_name} Name: python-%{pypi_name}
Version: 7.0 Version: 12.0
Release: 1 Release: 1
Summary: An implementation of the WebSocket Protocol for python with asyncio Summary: An implementation of the WebSocket Protocol for python with asyncio
License: BSD License: BSD
Group: Development/Python Group: Development/Python
URL: https://github.com/aaugustin/websockets URL: https://github.com/aaugustin/websockets
Source0: %{url}/archive/%{version}/%{pypi_name}-%{version}.tar.gz Source0: %{url}/archive/%{version}/%{pypi_name}-%{version}.tar.gz
Patch0: python-websockets-setup.patch
BuildRequires: gcc BuildRequires: gcc
%global _description \ %global _description \
@ -26,22 +27,6 @@ applications.
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
%package -n python3-%{pypi_name}
Summary: %{summary}
BuildRequires: pkgconfig(python3)
BuildRequires: python3egg(setuptools)
# the 10.1 pops up always.
Obsoletes: python3-%{pypi_name} < %{EVRD}
%description -n python3-%{pypi_name}
%{_description}
%files -n python3-%{pypi_name}
%doc README.rst LICENSE
%{py3_platsitedir}/%{pypi_name}-%{version}-py%{python3_version}.egg-info
%{py3_platsitedir}/%{pypi_name}
#-------------------------------------------------------------------------
%package -n python38-%{pypi_name} %package -n python38-%{pypi_name}
Summary: %{summary} Summary: %{summary}
@ -62,24 +47,18 @@ Obsoletes: python38-%{pypi_name} < %{EVRD}
%prep %prep
%setup -qn %{pypi_name}-%{version} %setup -qn %{pypi_name}-%{version}
# Remove upstream's egg-info %patch0 -p1
rm -vrf %{pypi_name}.egg-info
cp -a . %{py38dir} # Remove upstream's egg-info
#rm -vrf %{pypi_name}.egg-info
#cp -a . %{py38dir}
%build %build
%py3_build
pushd %{py38dir}
%py38_build %py38_build
popd
%install %install
%py3_install
pushd %{py38dir}
%py38_install %py38_install
popd
# Remove installed C file # Remove installed C file
rm -vf %{buildroot}%{py3_platsitedir}/%{pypi_name}/speedups.c %{buildroot}%{py38_platsitedir}/%{pypi_name}/speedups.c rm -vf %{buildroot}%{py3_platsitedir}/%{pypi_name}/speedups.c %{buildroot}%{py38_platsitedir}/%{pypi_name}/speedups.c