14
0
forked from pool/python-txWS

Accepting request 1089605 from home:pgajdos:python

- do not require six
- added patches
  fix https://github.com/MostAwesomeDude/txWS/issues/36
  + python-txWS-no-python2.patch
  05aadd036a
  + python-txWS-tobytes.patch
- added sources
  9e3a2a464b
  + tests.py

OBS-URL: https://build.opensuse.org/request/show/1089605
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-txWS?expand=0&rev=9
This commit is contained in:
2023-05-30 13:40:35 +00:00
committed by Git OBS Bridge
parent 757abba350
commit 10b8f8bb61
5 changed files with 546 additions and 8 deletions

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-txWS
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,21 +16,27 @@
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%bcond_without test
Name: python-txWS
Version: 0.9.1
Release: 0
Summary: Twisted WebSockets wrapper
License: X11
Group: Development/Languages/Python
URL: http://github.com/MostAwesomeDude/txWS
Source: https://files.pythonhosted.org/packages/source/t/txWS/txWS-%{version}.tar.gz
URL: https://github.com/MostAwesomeDude/txWS
Source0: https://files.pythonhosted.org/packages/source/t/txWS/txWS-%{version}.tar.gz
# https://github.com/MostAwesomeDude/txWS/commit/9e3a2a464b1c908086c82b293c271e58196f83df
Source1: https://raw.githubusercontent.com/MostAwesomeDude/txWS/master/tests.py
# https://github.com/MostAwesomeDude/txWS/issues/36
Patch0: python-txWS-no-python2.patch
# https://github.com/MostAwesomeDude/txWS/commit/05aadd036a7d9a0959c0d915a139779706e960d7
Patch1: python-txWS-tobytes.patch
BuildRequires: %{python_module Twisted}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module six}
BuildRequires: %{python_module vcversioner}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: python3-pyupgrade
Requires: python-Twisted
BuildArch: noarch
%python_subpackages
@@ -39,7 +45,7 @@ txWS (Twisted WebSockets) is a library for
adding WebSockets server support to Twisted applications.
%prep
%setup -q -n txWS-%{version}
%autosetup -p1 -n txWS-%{version}
%build
%python_build
@@ -48,9 +54,18 @@ adding WebSockets server support to Twisted applications.
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
cp %{SOURCE1} .
# https://github.com/MostAwesomeDude/txWS/issues/36
pyupgrade tests.py || true
sed -i '/import six/d' tests.py
sed -i 's:\(challenge = \)\(.*\):\1b\2:' tests.py
%pyunittest -v
%files %{python_files}
%license LICENSE
%doc CHANGELOG.rst README.rst
%{python_sitelib}/*
%{python_sitelib}/tx{WS,ws}*
%{python_sitelib}/__pycache__
%changelog