forked from pool/python-pywebpush
Accepting request 1095729 from devel:languages:python
- Add patch no-more-six.patch: * Do not require six. - Do not use greedy globs in %files. OBS-URL: https://build.opensuse.org/request/show/1095729 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pywebpush?expand=0&rev=4
This commit is contained in:
40
no-more-six.patch
Normal file
40
no-more-six.patch
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
Index: pywebpush-1.14.0/pywebpush/__init__.py
|
||||||
|
===================================================================
|
||||||
|
--- pywebpush-1.14.0.orig/pywebpush/__init__.py
|
||||||
|
+++ pywebpush-1.14.0/pywebpush/__init__.py
|
||||||
|
@@ -13,7 +13,6 @@ try:
|
||||||
|
except ImportError: # pragma nocover
|
||||||
|
from urlparse import urlparse
|
||||||
|
|
||||||
|
-import six
|
||||||
|
import http_ece
|
||||||
|
import requests
|
||||||
|
from cryptography.hazmat.backends import default_backend
|
||||||
|
@@ -152,7 +151,7 @@ class WebPusher:
|
||||||
|
for k in ['p256dh', 'auth']:
|
||||||
|
if keys.get(k) is None:
|
||||||
|
raise WebPushException("Missing keys value: {}".format(k))
|
||||||
|
- if isinstance(keys[k], six.text_type):
|
||||||
|
+ if isinstance(keys[k], str):
|
||||||
|
keys[k] = bytes(keys[k].encode('utf8'))
|
||||||
|
receiver_raw = base64.urlsafe_b64decode(
|
||||||
|
self._repad(keys['p256dh']))
|
||||||
|
@@ -206,7 +205,7 @@ class WebPusher:
|
||||||
|
format=serialization.PublicFormat.UncompressedPoint
|
||||||
|
)
|
||||||
|
|
||||||
|
- if isinstance(data, six.text_type):
|
||||||
|
+ if isinstance(data, str):
|
||||||
|
data = bytes(data.encode('utf8'))
|
||||||
|
if content_encoding == "aes128gcm":
|
||||||
|
self.verb("Encrypting to aes128gcm...")
|
||||||
|
Index: pywebpush-1.14.0/requirements.txt
|
||||||
|
===================================================================
|
||||||
|
--- pywebpush-1.14.0.orig/requirements.txt
|
||||||
|
+++ pywebpush-1.14.0/requirements.txt
|
||||||
|
@@ -1,5 +1,4 @@
|
||||||
|
cryptography>=2.6.1
|
||||||
|
http-ece>=1.1.0
|
||||||
|
requests>=2.21.0
|
||||||
|
-six>=1.15.0
|
||||||
|
py-vapid>=1.7.0
|
@@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Jun 28 06:43:49 UTC 2023 - Steve Kowalik <steven.kowalik@suse.com>
|
||||||
|
|
||||||
|
- Add patch no-more-six.patch:
|
||||||
|
* Do not require six.
|
||||||
|
- Do not use greedy globs in %files.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Apr 8 10:03:17 UTC 2022 - pgajdos@suse.com
|
Fri Apr 8 10:03:17 UTC 2022 - pgajdos@suse.com
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-pywebpush
|
# spec file for package python-pywebpush
|
||||||
#
|
#
|
||||||
# Copyright (c) 2022 SUSE LLC
|
# Copyright (c) 2023 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@@ -16,7 +16,6 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
|
||||||
Name: python-pywebpush
|
Name: python-pywebpush
|
||||||
Version: 1.14.0
|
Version: 1.14.0
|
||||||
Release: 0
|
Release: 0
|
||||||
@@ -24,6 +23,8 @@ Summary: WebPush publication library
|
|||||||
License: MPL-2.0
|
License: MPL-2.0
|
||||||
URL: https://github.com/web-push-libs/pywebpush
|
URL: https://github.com/web-push-libs/pywebpush
|
||||||
Source: https://files.pythonhosted.org/packages/source/p/pywebpush/pywebpush-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/p/pywebpush/pywebpush-%{version}.tar.gz
|
||||||
|
# PATCH-FIX-OPENSUSE Do not require six module
|
||||||
|
Patch0: no-more-six.patch
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
@@ -47,7 +48,7 @@ BuildRequires: %{python_module requests >= 2.21.0}
|
|||||||
WebPush publication library.
|
WebPush publication library.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n pywebpush-%{version}
|
%autosetup -p1 -n pywebpush-%{version}
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%python_build
|
%python_build
|
||||||
@@ -72,6 +73,7 @@ sed -i 's:from mock:from unittest.mock:' pywebpush/tests/test_webpush.py
|
|||||||
%doc CHANGELOG.md README.md README.rst
|
%doc CHANGELOG.md README.md README.rst
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%python_alternative %{_bindir}/pywebpush
|
%python_alternative %{_bindir}/pywebpush
|
||||||
%{python_sitelib}/*
|
%{python_sitelib}/pywebpush
|
||||||
|
%{python_sitelib}/pywebpush-%{version}*-*info
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Reference in New Issue
Block a user