From d06b0da08a9b43907eacd0b5202b5ac2ddfd9e1fbcda30b670cfc0430d47bd13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Mon, 18 May 2020 13:01:13 +0000 Subject: [PATCH] Accepting request 806922 from home:pgajdos:python submit OBS-URL: https://build.opensuse.org/request/show/806922 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-user_agent?expand=0&rev=11 --- python-user_agent.changes | 5 +++++ python-user_agent.spec | 22 +++++++++++++++------- 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/python-user_agent.changes b/python-user_agent.changes index 3271feb..91abf21 100644 --- a/python-user_agent.changes +++ b/python-user_agent.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon May 18 09:10:44 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + ------------------------------------------------------------------- Tue Feb 26 08:24:05 UTC 2019 - John Vandenberg diff --git a/python-user_agent.spec b/python-user_agent.spec index e7247f7..d58d3f9 100644 --- a/python-user_agent.spec +++ b/python-user_agent.spec @@ -1,7 +1,7 @@ # # spec file for package python-user_agent # -# Copyright (c) 2019 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 @@ -23,18 +23,19 @@ Release: 0 Summary: User-Agent generator for Python License: MIT Group: Development/Languages/Python -Url: https://github.com/lorien/user_agent -Source: https://pypi.io/packages/source/u/user_agent/user_agent-%{version}.tar.gz +URL: https://github.com/lorien/user_agent +Source: https://files.pythonhosted.org/packages/source/u/user_agent/user_agent-%{version}.tar.gz BuildRequires: %{python_module setuptools} BuildRequires: %{python_module six} BuildRequires: fdupes BuildRequires: python-rpm-macros +Requires: python-six +Requires(post): update-alternatives +Requires(postun): update-alternatives +BuildArch: noarch # SECTION test requirements BuildRequires: %{python_module pytest} # /SECTION -Requires: python-six -BuildArch: noarch - %python_subpackages %description @@ -48,14 +49,21 @@ This module generates random, valid web user agents. %install %python_install +%python_clone -a %{buildroot}%{_bindir}/ua %python_expand %fdupes %{buildroot}%{$python_sitelib} %check %python_exec setup.py test +%post +%python_install_alternative ua + +%postun +%python_uninstall_alternative ua + %files %{python_files} %license LICENSE -%python3_only %{_bindir}/ua +%python_alternative %{_bindir}/ua %{python_sitelib}/* %changelog