From 1daf82d201b41fbe05b7a6e07dbfc1590774d256b87909bda93cce1267f52201 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:25 +0000 Subject: [PATCH] Accepting request 808757 from home:pgajdos:python submit OBS-URL: https://build.opensuse.org/request/show/808757 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-imagecodecs?expand=0&rev=7 --- python-imagecodecs.changes | 5 +++++ python-imagecodecs.spec | 11 ++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/python-imagecodecs.changes b/python-imagecodecs.changes index be07758..012749d 100644 --- a/python-imagecodecs.changes +++ b/python-imagecodecs.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon May 25 10:59:24 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + ------------------------------------------------------------------- Thu Apr 23 10:58:48 UTC 2020 - Tomáš Chvátal diff --git a/python-imagecodecs.spec b/python-imagecodecs.spec index 7ef5e77..1513127 100644 --- a/python-imagecodecs.spec +++ b/python-imagecodecs.spec @@ -54,6 +54,8 @@ BuildRequires: pkgconfig(libwebp) BuildRequires: pkgconfig(libzstd) BuildRequires: pkgconfig(zlib) Requires: python-numpy >= 1.11.3 +Requires(post): update-alternatives +Requires(postun): update-alternatives Recommends: python-Pillow Recommends: python-blosc Recommends: python-lz4 @@ -83,6 +85,7 @@ export CFLAGS="%{optflags}" %install %python_install +%python_clone -a %{buildroot}%{_bindir}/imagecodecs %{python_expand rm -rf %{buildroot}%{$python_sitearch}/imagecodecs/licenses/ %fdupes %{buildroot}%{$python_sitearch} } @@ -94,10 +97,16 @@ mv imagecodecs __imagecodecs %pytest_arch tests mv __imagecodecs imagecodecs +%post +%python_install_alternative imagecodecs + +%postun +%python_uninstall_alternative imagecodecs + %files %{python_files} %license LICENSE imagecodecs/licenses/* %doc README.rst -%python3_only %{_bindir}/imagecodecs +%python_alternative %{_bindir}/imagecodecs %{python_sitearch}/* %changelog