Notification time stamped 2022-08-31 23:53:54 UTC
From 199c505b3a2f4f63e2ab64fce3bbc28c1f7500dc Mon Sep 17 00:00:00 2001
From: Chris Caron <lead2gold(a)gmail.com>
Date: Aug 31 2022 23:35:00 +0000
Subject: Rebuilt for RHEL9 Support
Signed-off-by: Chris Caron <lead2gold(a)gmail.com>
---
diff --git a/python-apprise.spec b/python-apprise.spec
index 9f9d54c..632a93e 100644
--- a/python-apprise.spec
+++ b/python-apprise.spec
@@ -60,7 +60,7 @@ Techulus Push, Telegram, Twilio, Twitter, Twist, XBMC, Vonage, Webex
Teams}
Name: python-%{pypi_name}
Version: 1.0.0
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: A simple wrapper to many popular notification services used today
License: MIT
URL:
https://github.com/caronc/%{pypi_name}
@@ -161,7 +161,12 @@ Requires: python%{python3_pkgversion}-cryptography
Requires: python%{python3_pkgversion}-yaml
%if %{with tests}
+%if 0%{?rhel} >= 9
+# Do not import python3-mock
+%else
+# python-mock switched to unittest.mock
BuildRequires: python%{python3_pkgversion}-mock
+%endif
BuildRequires: python%{python3_pkgversion}-pytest
BuildRequires: python%{python3_pkgversion}-pytest-runner
%endif
@@ -183,6 +188,17 @@ rm -f apprise/py3compat/asyncio.py
%patch1 -p1
%endif
+%if 0%{?rhel} >= 9
+# Nothing to do under normal circumstances; this line here allows legacy
+# copies of Apprise to still build against this one
+find test -type f -name '*.py' -exec \
+ sed -i -e 's|^import mock|from unittest import mock|g' {} \;
+%else
+# support python-mock (remain backwards compatible with older distributions)
+find test -type f -name '*.py' -exec \
+ sed -i -e 's|^from unittest import mock|import mock|g' {} \;
+%endif
+
%build
%if 0%{?with_python2}
%py2_build
@@ -243,6 +259,9 @@ LANG=C.UTF-8 PYTHONPATH=%{buildroot}%{python3_sitelib}
py.test-%{python3_version
%endif
%changelog
+* Wed Aug 31 2022 Chris Caron <lead2gold(a)gmail.com> - 1.0.0-2
+- Rebuilt for RHEL9 Support
+
* Sat Aug 6 2022 Chris Caron <lead2gold(a)gmail.com> - 1.0.0-1
- Updated to v1.0.0
https://src.fedoraproject.org/rpms/python-apprise/c/199c505b3a2f4f63e2ab6...