14
0
forked from pool/python-ntfy

- Drop deprecated usage of %python3_only in favour of

%python_alternative.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-ntfy?expand=0&rev=10
This commit is contained in:
Matthias Bach
2020-04-21 19:16:13 +00:00
committed by Git OBS Bridge
parent 8e486d32cf
commit 859fa2b1a6
2 changed files with 19 additions and 4 deletions

View File

@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue Apr 21 19:15:31 UTC 2020 - Matthias Bach <marix@marix.org>
- Drop deprecated usage of %python3_only in favour of
%python_alternative.
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Dec 4 12:50:54 UTC 2018 - Matej Cepl <mcepl@suse.com> Tue Dec 4 12:50:54 UTC 2018 - Matej Cepl <mcepl@suse.com>

View File

@@ -1,8 +1,8 @@
# #
# spec file for package python-ntfy # spec file for package python-ntfy
# #
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2020 SUSE LLC
# Copyright (c) 2018 Matthias Bach <marix@marix.org>. # Copyright (c) 2020 Matthias Bach <marix@marix.org>.
# #
# 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
@@ -27,7 +27,7 @@ Release: 0
Summary: A utility for sending push notifications Summary: A utility for sending push notifications
License: GPL-3.0-only License: GPL-3.0-only
Group: Development/Languages/Python Group: Development/Languages/Python
Url: https://github.com/dschep/ntfy URL: https://github.com/dschep/ntfy
Source: ntfy-%{version}.tar.xz Source: ntfy-%{version}.tar.xz
BuildRequires: %{python_module appdirs} BuildRequires: %{python_module appdirs}
BuildRequires: %{python_module requests} BuildRequires: %{python_module requests}
@@ -51,6 +51,8 @@ Suggests: python-psutil
Suggests: python-instapush Suggests: python-instapush
Suggests: python-rocketchat-API Suggests: python-rocketchat-API
Suggests: python-emoji Suggests: python-emoji
Requires(post): update-alternatives
Requires(postun): update-alternatives
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch BuildArch: noarch
@@ -77,16 +79,23 @@ Quickstart
%install %install
%python_install %python_install
%python_clone -a %{buildroot}%{_bindir}/ntfy
%python_expand %fdupes %{buildroot}%{$python_sitelib}/ntfy* %python_expand %fdupes %{buildroot}%{$python_sitelib}/ntfy*
%check %check
%python_exec setup.py test %python_exec setup.py test
%post
%python_install_alternative ntfy
%postun
%python_uninstall_alternative ntfy
%files %{python_files} %files %{python_files}
%defattr(-,root,root,-) %defattr(-,root,root,-)
%doc README.rst %doc README.rst
%license LICENSE %license LICENSE
%python3_only %{_bindir}/ntfy %python_alternative %{_bindir}/ntfy
%{python_sitelib}/* %{python_sitelib}/*
%changelog %changelog