From ad142b6eb9a9c0f31e5f77afb37fa74a5aa448239316f23fe1b3a49276c0cc6d Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Tue, 5 May 2020 22:02:57 +0000 Subject: [PATCH] - Don't use %python3_only command, but properly use alternatives. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pytesseract?expand=0&rev=17 --- python-pytesseract.changes | 5 +++++ python-pytesseract.spec | 11 ++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/python-pytesseract.changes b/python-pytesseract.changes index eaf1ec3..b1ed0fe 100644 --- a/python-pytesseract.changes +++ b/python-pytesseract.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue May 5 22:00:53 UTC 2020 - Matej Cepl + +- Don't use %python3_only command, but properly use alternatives. + ------------------------------------------------------------------- Mon Mar 23 09:25:20 UTC 2020 - pgajdos@suse.com diff --git a/python-pytesseract.spec b/python-pytesseract.spec index 6a6c1e5..b142c5b 100644 --- a/python-pytesseract.spec +++ b/python-pytesseract.spec @@ -44,6 +44,8 @@ BuildRequires: tesseract-traineddata-eng BuildRequires: tesseract-traineddata-fra BuildRequires: pkgconfig(tesseract) # /SECTION +Requires(post): update-alternatives +Requires(postun): update-alternatives %python_subpackages %description @@ -67,15 +69,22 @@ sed -i -e '/^#!\//, 1d' src/pytesseract.py %install %python_install +%python_clone -a %{buildroot}%{_bindir}/pytesseract %python_expand %fdupes %{buildroot}%{$python_sitelib} %check %pytest +%post +%python_install_alternative pytesseract + +%postun +%python_uninstall_alternative pytesseract + %files %{python_files} %doc README.rst %license LICENSE -%python3_only %{_bindir}/pytesseract +%python_alternative %{_bindir}/pytesseract %{python_sitelib}/* %changelog