From c6b79ee6537ae76369664375bd21a87bee6faf4e0cae5075f806269884745e2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Mon, 25 May 2020 09:26:37 +0000 Subject: [PATCH] Accepting request 808627 from home:pgajdos:python submit OBS-URL: https://build.opensuse.org/request/show/808627 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-keyring?expand=0&rev=82 --- python-keyring.changes | 5 +++++ python-keyring.spec | 11 ++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/python-keyring.changes b/python-keyring.changes index 1db4eba..7b34182 100644 --- a/python-keyring.changes +++ b/python-keyring.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon May 25 06:50:30 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + ------------------------------------------------------------------- Thu Apr 16 08:27:33 UTC 2020 - pgajdos@suse.com diff --git a/python-keyring.spec b/python-keyring.spec index 037b79b..3060e68 100644 --- a/python-keyring.spec +++ b/python-keyring.spec @@ -39,6 +39,8 @@ Requires: python-SecretStorage >= 3 Requires: python-entrypoints Requires: python-jeepney >= 0.4.2 Requires: python-setuptools +Requires(post): update-alternatives +Requires(postun): update-alternatives BuildArch: noarch %python_subpackages @@ -57,15 +59,22 @@ sed -i -e 's,--flake8,,' -e 's,--black,,' -e 's,--cov,,' pytest.ini %install %python_install +%python_clone -a %{buildroot}%{_bindir}/keyring %python_expand %fdupes %{buildroot}%{$python_sitelib} %check %pytest +%post +%python_install_alternative keyring + +%postun +%python_uninstall_alternative keyring + %files %{python_files} %doc README.rst CHANGES.rst %license LICENSE -%python3_only %{_bindir}/keyring +%python_alternative %{_bindir}/keyring %{python_sitelib}/keyring-%{version}-py*.egg-info %{python_sitelib}/keyring/