From 3bd7bdf0d98fdc0eac4eea662a949daffca3bbbe9b47be5ca3e82e2c8a04f661 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Fri, 29 Jan 2021 15:10:39 +0000 Subject: [PATCH] Accepting request 867710 from home:bnavigator:branches:openSUSE:Factory - Fix singlespec OBS-URL: https://build.opensuse.org/request/show/867710 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-xkcdpass?expand=0&rev=10 --- python-xkcdpass.changes | 5 +++++ python-xkcdpass.spec | 32 +++++++++++++++++++------------- 2 files changed, 24 insertions(+), 13 deletions(-) diff --git a/python-xkcdpass.changes b/python-xkcdpass.changes index 6b2ce69..fb13e25 100644 --- a/python-xkcdpass.changes +++ b/python-xkcdpass.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Jan 29 11:41:18 UTC 2021 - Ben Greiner + +- Fix singlespec + ------------------------------------------------------------------- Sat Dec 19 08:33:59 UTC 2020 - İsmail Dönmez diff --git a/python-xkcdpass.spec b/python-xkcdpass.spec index e0c8332..2d788a9 100644 --- a/python-xkcdpass.spec +++ b/python-xkcdpass.spec @@ -1,7 +1,7 @@ # # spec file for package python-xkcdpass # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -30,9 +30,9 @@ Source: https://files.pythonhosted.org/packages/cc/3a/065130b94cb57cbbd7 BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} BuildRequires: fdupes -BuildRequires: python3-base -Requires: python-setuptools BuildArch: noarch +Requires(post): update-alternatives +Requires(postun): update-alternatives %python_subpackages %description @@ -41,25 +41,31 @@ inspired by XKCD 936 (https://xkcd.com/936/) %prep %setup -q -n xkcdpass-%{version} +# Remove the shebang +sed -i -e '1d' xkcdpass/xkcd_password.py %build -%{python_build} - -%check -%{pytest} +%python_build %install -%{python_install} +%python_install +%python_clone -a %{buildroot}%{_bindir}/xkcdpass +%python_expand %fdupes %{buildroot}%{$python_sitelib} -# Remove the shebang -sed -i -e '1d' %{buildroot}%{python_sitelib}/xkcdpass/xkcd_password.py +%check +%pytest -%fdupes %{buildroot}%{python_sitelib} +%post +%python_install_alternative xkcdpass + +%postun +%python_uninstall_alternative xkcdpass %files %{python_files} %license LICENSE* %doc README.rst -%{_bindir}/xkcdpass -%{python_sitelib}/* +%python_alternative %{_bindir}/xkcdpass +%{python_sitelib}/xkcdpass +%{python_sitelib}/xkcdpass-%{version}*-info %changelog