From 4b25baa531a91d830ef5cc534d080aab28f054a51f13e001889efec82a203b18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Wed, 27 May 2020 10:14:33 +0000 Subject: [PATCH] Accepting request 809228 from home:pgajdos:python submit OBS-URL: https://build.opensuse.org/request/show/809228 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-ddg3?expand=0&rev=5 --- python-ddg3.changes | 5 +++++ python-ddg3.spec | 23 ++++++++++++++++------- 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/python-ddg3.changes b/python-ddg3.changes index 7d60f92..9def3b9 100644 --- a/python-ddg3.changes +++ b/python-ddg3.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue May 26 07:22:31 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + ------------------------------------------------------------------- Thu Nov 8 15:13:00 UTC 2018 - Antonio Larrosa diff --git a/python-ddg3.spec b/python-ddg3.spec index 68aa189..a54cd8e 100644 --- a/python-ddg3.spec +++ b/python-ddg3.spec @@ -1,7 +1,7 @@ # # spec file for package python-ddg3 # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,7 +12,8 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# %define skip_python2 1 @@ -20,17 +21,18 @@ Name: python-ddg3 Version: 0.6.6git~20170824T092521~0ef6b2f Release: 0 -License: BSD-3-Clause Summary: Library for querying the Duck Duck Go API -Url: https://github.com/jpetrucciani/python-duckduckgo +License: BSD-3-Clause Group: Development/Languages/Python +URL: https://github.com/jpetrucciani/python-duckduckgo Source: ddg3-%{version}.tar.xz -BuildRequires: python-rpm-macros BuildRequires: %{python_module setuptools} BuildRequires: fdupes +BuildRequires: python-rpm-macros Requires: python-requests +Requires(post): update-alternatives +Requires(postun): update-alternatives BuildArch: noarch - %python_subpackages %description @@ -44,11 +46,18 @@ A Python3 library for querying the Duck Duck Go API. %install %python_install +%python_clone -a %{buildroot}%{_bindir}/ddg3 %python_expand %fdupes %{buildroot}%{$python_sitelib} +%post +%python_install_alternative ddg3 + +%postun +%python_uninstall_alternative ddg3 + %files %{python_files} %license LICENSE -%python3_only %{_bindir}/ddg3 +%python_alternative %{_bindir}/ddg3 %{python_sitelib}/* %changelog