From bee2a8a4aabb97eb93071569b1e105cf57ee8ae02127abb49594a9307935f46b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Wed, 20 May 2020 11:33:37 +0000 Subject: [PATCH] Accepting request 807636 from home:pgajdos:python submit OBS-URL: https://build.opensuse.org/request/show/807636 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pythonfinder?expand=0&rev=11 --- python-pythonfinder.changes | 5 +++++ python-pythonfinder.spec | 11 ++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/python-pythonfinder.changes b/python-pythonfinder.changes index 3898901..d3d75bd 100644 --- a/python-pythonfinder.changes +++ b/python-pythonfinder.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed May 20 07:26:51 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + ------------------------------------------------------------------- Fri Jan 10 14:59:00 UTC 2020 - Tomáš Chvátal diff --git a/python-pythonfinder.spec b/python-pythonfinder.spec index 0906df3..35ccf7b 100644 --- a/python-pythonfinder.spec +++ b/python-pythonfinder.spec @@ -35,6 +35,8 @@ Requires: python-crayons Requires: python-packaging Requires: python-six Requires: python-vistir >= 0.2.5 +Requires(post): update-alternatives +Requires(postun): update-alternatives BuildArch: noarch # SECTION test requirements BuildRequires: %{python_module attrs} @@ -66,6 +68,7 @@ rm -rf src/pythonfinder/_vendor/pep514tools %install %python_install +%python_clone -a %{buildroot}%{_bindir}/pyfinder %python_expand %fdupes %{buildroot}%{$python_sitelib} %check @@ -73,10 +76,16 @@ rm -rf src/pythonfinder/_vendor/pep514tools # to modify read-only system image files. %pytest -k 'not (test_python_versions or test_shims_are_kept or test_shims_are_removed)' +%post +%python_install_alternative pyfinder + +%postun +%python_uninstall_alternative pyfinder + %files %{python_files} %doc CHANGELOG.rst README.rst %license LICENSE.txt -%python3_only %{_bindir}/pyfinder +%python_alternative %{_bindir}/pyfinder %{python_sitelib}/* %changelog