From e21c4f4a80d67b1859bf31e6e814d68ebb2938b811fce7a3686c45d5c19bee71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Thu, 28 May 2020 07:35:26 +0000 Subject: [PATCH] Accepting request 809573 from home:pgajdos:python submit OBS-URL: https://build.opensuse.org/request/show/809573 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-CacheControl?expand=0&rev=18 --- python-CacheControl.changes | 5 +++++ python-CacheControl.spec | 13 +++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/python-CacheControl.changes b/python-CacheControl.changes index b97a59c..dafcd1e 100644 --- a/python-CacheControl.changes +++ b/python-CacheControl.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed May 27 09:36:33 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + ------------------------------------------------------------------- Thu Jan 2 11:57:41 UTC 2020 - John Vandenberg diff --git a/python-CacheControl.spec b/python-CacheControl.spec index 1ee4821..7b05801 100644 --- a/python-CacheControl.spec +++ b/python-CacheControl.spec @@ -1,7 +1,7 @@ # # spec file for package python-CacheControl # -# Copyright (c) 2020 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 @@ -30,6 +30,8 @@ BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-msgpack Requires: python-requests +Requires(post): update-alternatives +Requires(postun): update-alternatives Recommends: python-lockfile >= 0.9 Suggests: python-redis >= 2.10.5 BuildArch: noarch @@ -57,16 +59,23 @@ requests session object. %install %python_install +%python_clone -a %{buildroot}%{_bindir}/doesitcache %python_expand %fdupes %{buildroot}%{$python_sitelib} %check # test_file_cache_recognizes_consumed_file_handle uses httpbin.org directly PYTHONPATH=%{buildroot}%{python3_sitelib} py.test-%{python3_bin_suffix} -v -k 'not test_file_cache_recognizes_consumed_file_handle' +%post +%python_install_alternative doesitcache + +%postun +%python_uninstall_alternative doesitcache + %files %{python_files} %license LICENSE.txt %doc README.rst -%python3_only %{_bindir}/doesitcache +%python_alternative %{_bindir}/doesitcache %{python_sitelib}/* %changelog