From f27a31ba7d82bcb9a190f200a2d9cd028aecb4fc910f84114a6311b011bac10e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Mon, 25 May 2020 13:34:22 +0000 Subject: [PATCH] Accepting request 808758 from home:pgajdos:python submit OBS-URL: https://build.opensuse.org/request/show/808758 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-imageio?expand=0&rev=19 --- python-imageio.changes | 5 +++++ python-imageio.spec | 16 ++++++++++++++-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/python-imageio.changes b/python-imageio.changes index 6723a3f..8f44051 100644 --- a/python-imageio.changes +++ b/python-imageio.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon May 25 10:59:24 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + ------------------------------------------------------------------- Thu Apr 9 13:50:54 UTC 2020 - Marketa Calabkova diff --git a/python-imageio.spec b/python-imageio.spec index 7b49561..dc22f28 100644 --- a/python-imageio.spec +++ b/python-imageio.spec @@ -37,6 +37,8 @@ BuildRequires: python-rpm-macros Requires: python-Pillow Requires: python-imageio-ffmpeg Requires: python-numpy +Requires(post): update-alternatives +Requires(postun): update-alternatives Recommends: libfreeimageplus3 BuildArch: noarch %python_subpackages @@ -62,17 +64,27 @@ export IMAGEIO_NO_INTERNET=1 %install export IMAGEIO_NO_INTERNET=1 %python_install +%python_clone -a %{buildroot}%{_bindir}/imageio_remove_bin +%python_clone -a %{buildroot}%{_bindir}/imageio_download_bin %python_expand %fdupes %{buildroot}%{$python_sitelib} %check export IMAGEIO_NO_INTERNET=1 %pytest -k "not test_fei_file_fail and not test_ffmpeg and not test_series_unclosed and not test_import_dependencies" +%post +%python_install_alternative imageio_remove_bin +%python_install_alternative imageio_download_bin + +%postun +%python_uninstall_alternative imageio_remove_bin +%python_uninstall_alternative imageio_download_bin + %files %{python_files} %license LICENSE %doc CONTRIBUTORS.txt README.md %{python_sitelib}/* -%python3_only %{_bindir}/imageio_download_bin -%python3_only %{_bindir}/imageio_remove_bin +%python_alternative %{_bindir}/imageio_download_bin +%python_alternative %{_bindir}/imageio_remove_bin %changelog