commit 3e7db82b00f2052cea9f257e142af02ed4539ea0e4f203a6bd004a080559bb49 Author: Matej Cepl Date: Thu Feb 15 09:09:24 2024 +0000 Accepting request 1146545 from home:smolsheep:upgrades This package is required for the current version of Borgmatic, which I updated. I would like to maintain in the python devel project as well as in Factory. OBS-URL: https://build.opensuse.org/request/show/1146545 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-apprise?expand=0&rev=1 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..37a8eaa --- /dev/null +++ b/.gitattributes @@ -0,0 +1,24 @@ +*.changes merge=merge-changes +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tar filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8b731c3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +*.obscpio +*.osc +_build.* +.pbuild diff --git a/apprise-1.7.2.tar.gz b/apprise-1.7.2.tar.gz new file mode 100644 index 0000000..e5351eb --- /dev/null +++ b/apprise-1.7.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:09e159b29008e6c8e93d7ffc3c15d419c0bbae41620405f8f2d3432b72a2e9bf +size 1638384 diff --git a/apprise-pytest-session_mocker-removal.patch b/apprise-pytest-session_mocker-removal.patch new file mode 100644 index 0000000..523e1d3 --- /dev/null +++ b/apprise-pytest-session_mocker-removal.patch @@ -0,0 +1,20 @@ +diff -Naur apprise-1.6.0/test/conftest.py apprise-1.6.0-patched/test/conftest.py +--- apprise-1.6.0/test/conftest.py 2023-12-27 11:20:40.000000000 -0500 ++++ apprise-1.6.0-patched/test/conftest.py 2023-12-27 13:43:22.583100037 -0500 +@@ -45,8 +45,8 @@ + A_MGR = AttachmentManager() + + +-@pytest.fixture(scope="function", autouse=True) +-def no_throttling_everywhere(session_mocker): ++@pytest.fixture(autouse=True) ++def no_throttling_everywhere(mocker): + """ + A pytest session fixture which disables throttling on all notifiers. + It is automatically enabled. +@@ -57,4 +57,4 @@ + A_MGR.unload_modules() + + for plugin in N_MGR.plugins(): +- session_mocker.patch.object(plugin, "request_rate_per_sec", 0) ++ mocker.patch.object(plugin, "request_rate_per_sec", 0) diff --git a/fix-test_plugin_glib.patch b/fix-test_plugin_glib.patch new file mode 100644 index 0000000..48afb88 --- /dev/null +++ b/fix-test_plugin_glib.patch @@ -0,0 +1,10 @@ +--- a/test/test_plugin_glib.py ++++ b/test/test_plugin_glib.py +@@ -31,6 +31,7 @@ + import re + import sys + import types ++import dbus + from unittest.mock import Mock, call, ANY + + import pytest diff --git a/python-apprise.changes b/python-apprise.changes new file mode 100644 index 0000000..f2b9a82 --- /dev/null +++ b/python-apprise.changes @@ -0,0 +1,4 @@ +------------------------------------------------------------------- +Sun Jan 28 07:24:44 UTC 2024 - Paolo Panto + +- Initial package (version 1.7.2) for openSUSE diff --git a/python-apprise.rpmlintrc b/python-apprise.rpmlintrc new file mode 100644 index 0000000..4d678d3 --- /dev/null +++ b/python-apprise.rpmlintrc @@ -0,0 +1,2 @@ +# catch false positive +addFilter("explicit-lib-dependency python.*-requests-oauthlib") diff --git a/python-apprise.spec b/python-apprise.spec new file mode 100644 index 0000000..21f6302 --- /dev/null +++ b/python-apprise.spec @@ -0,0 +1,132 @@ +# +# spec file for package python-apprise +# +# Copyright (c) 2024 SUSE LLC +# Copyright (c) 2024 Paolo Panto +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%define skip_python2 1 + +%if 0%{?suse_version} > 1500 +%bcond_without libalternatives +%else +%bcond_with libalternatives +%endif + +Name: python-apprise +Version: 1.7.2 +Release: 0 +Summary: A simple wrapper to many popular notification services used today +License: BSD-2-Clause +URL: https://github.com/caronc/apprise +Source0: https://files.pythonhosted.org/packages/source/a/apprise/apprise-%{version}.tar.gz +Source99: %{name}.rpmlintrc +Patch0: fix-test_plugin_glib.patch +BuildRequires: %{python_module Babel} +BuildRequires: %{python_module Markdown} +BuildRequires: %{python_module PyYAML} +BuildRequires: %{python_module certifi} +BuildRequires: %{python_module click >= 5.0} +BuildRequires: %{python_module cryptography} +BuildRequires: %{python_module dbus-python} +BuildRequires: %{python_module paho-mqtt} +BuildRequires: %{python_module pip} +BuildRequires: %{python_module pytest-cov} +BuildRequires: %{python_module pytest-mock} +BuildRequires: %{python_module pytest-xdist} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module requests-oauthlib} +BuildRequires: %{python_module requests} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} +BuildRequires: fdupes +Requires: python-Markdown +Requires: python-PyYAML +Requires: python-certifi +Requires: python-click >= 5.0 +Requires: python-cryptography +Requires: python-requests +Requires: python-requests-oauthlib +Recommends: python-paho-mqtt +Suggests: python-dbus-python +%if 0%{?suse_version} <= 1500 +Patch10: apprise-pytest-session_mocker-removal.patch +BuildRequires: %{python_module dataclasses} +Requires: python-dataclasses +%endif +%if %{with libalternatives} +BuildRequires: alts +Requires: alts +%else +Requires(post): update-alternatives +Requires(postun): update-alternatives +%endif +BuildArch: noarch +%python_subpackages + +%description +Apprise is a Python package for simplifying access to all of the different +notification services that are out there. Apprise opens the door and makes +it easy to access: + +Apprise API, APRS, AWS SES, AWS SNS, Bark, Boxcar, Burst SMS, BulkSMS, BulkVS, +ClickSend, DAPNET, DingTalk, Discord, E-Mail, Emby, Faast, FCM, Flock, +Google Chat, Gotify, Growl, Guilded, Home Assistant, httpSMS, IFTTT, Join, +Kavenegar, KODI, Kumulos, LaMetric, Line, MacOSX, Mailgun, Mastodon, +Mattermost,Matrix, MessageBird, Microsoft Windows, Microsoft Teams, Misskey, +MQTT, MSG91, MyAndroid, Nexmo, Nextcloud, NextcloudTalk, Notica, Notifiarr, +Notifico, ntfy, Office365, OneSignal, Opsgenie, PagerDuty, PagerTree, +ParsePlatform, PopcornNotify, Prowl, Pushalot, PushBullet, Pushjet, PushMe, +Pushover, PushSafer, Pushy, PushDeer, Reddit, Rocket.Chat, RSyslog, SendGrid, +ServerChan, Signal, SimplePush, Sinch, Slack, SMSEagle, SMS Manager, SMTP2Go, +SparkPost, Super Toasty, Streamlabs, Stride, Synology Chat, Syslog, +Techulus Push, Telegram, Threema Gateway, Twilio, Twitter, Twist, XBMC, +Voipms, Vonage, WeCom Bot, WhatsApp, Webex Teams. + +%prep +%autosetup -n apprise-%{version} -p1 + +%build +%pyproject_wheel + +%install +%pyproject_install +install -D -m 0644 -t %{buildroot}%{_mandir}/man1 packaging/man/apprise.1 + +%python_clone -a %{buildroot}%{_bindir}/apprise +%python_clone -a %{buildroot}%{_mandir}/man1/apprise.1 +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +%pytest + +%pre +%python_libalternatives_reset_alternative apprise + +%post +%python_install_alternative apprise apprise.1 + +%postun +%python_uninstall_alternative apprise + +%files %{python_files} +%license LICENSE +%doc README.md +%python_alternative %{_bindir}/apprise +%python_alternative %{_mandir}/man1/apprise.1%{?ext_man} +%{python_sitelib}/apprise +%{python_sitelib}/apprise-%{version}.dist-info + +%changelog