15
0
forked from pool/python-apns2

Compare commits

4 Commits

3 changed files with 31 additions and 6 deletions

12
pytest9.patch Normal file
View File

@@ -0,0 +1,12 @@
Index: apns2-0.7.2/test/test_client.py
===================================================================
--- apns2-0.7.2.orig/test/test_client.py
+++ apns2-0.7.2/test/test_client.py
@@ -22,7 +22,6 @@ def notifications(tokens):
return [Notification(token=token, payload=payload) for token in tokens]
-@patch('apns2.credentials.init_context')
@pytest.fixture
def client(respx_mock, notifications):
return APNsClient(credentials=Credentials())

View File

@@ -1,3 +1,13 @@
-------------------------------------------------------------------
Mon Jan 19 17:13:46 UTC 2026 - Markéta Machová <mmachova@suse.com>
- Add pytest9.patch to fix build with pytest 9
-------------------------------------------------------------------
Tue May 13 13:43:11 UTC 2025 - Markéta Machová <mmachova@suse.com>
- Convert to pip-based build
-------------------------------------------------------------------
Fri Nov 25 07:09:30 UTC 2022 - Steve Kowalik <steven.kowalik@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-apns2
#
# Copyright (c) 2022 SUSE LLC
# Copyright (c) 2026 SUSE LLC and contributors
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,8 +16,6 @@
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
Name: python-apns2
Version: 0.7.2
Release: 0
@@ -29,7 +27,11 @@ Source0: https://files.pythonhosted.org/packages/source/a/apns2/apns2-%{v
Patch0: pr_122.patch
# PATCH-FIX-OPENSUSE Based on gh#Pr0Ger/PyAPNs2#149, is gross
Patch1: use-httpx.patch
# PATCH-FIX-UPSTREAM https://github.com/Pr0Ger/PyAPNs2/pull/163 Fix tests with pytest 9
Patch2: pytest9.patch
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-PyJWT >= 1.4.0
@@ -56,10 +58,10 @@ via HTTP/2 protocol.
%autosetup -p1 -n apns2-%{version}
%build
%python_build
%pyproject_wheel
%install
%python_install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
@@ -68,6 +70,7 @@ via HTTP/2 protocol.
%files %{python_files}
%license LICENSE
%doc README.md
%{python_sitelib}/*
%{python_sitelib}/apns2
%{python_sitelib}/apns2-%{version}*-info
%changelog