From fe92e0c9eba9ad83975534382cbabd5eccf3a9732510de333d6ba1d4a20ed80f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Wed, 27 May 2020 10:08:34 +0000 Subject: [PATCH] Accepting request 809259 from home:pgajdos:python submit OBS-URL: https://build.opensuse.org/request/show/809259 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-ftfy?expand=0&rev=13 --- python-ftfy.changes | 5 +++++ python-ftfy.spec | 14 ++++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/python-ftfy.changes b/python-ftfy.changes index 66944d6..8147180 100644 --- a/python-ftfy.changes +++ b/python-ftfy.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue May 26 06:34:21 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + ------------------------------------------------------------------- Tue Mar 10 08:48:18 UTC 2020 - Tomáš Chvátal diff --git a/python-ftfy.spec b/python-ftfy.spec index fc63e49..b490123 100644 --- a/python-ftfy.spec +++ b/python-ftfy.spec @@ -29,6 +29,8 @@ BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-wcwidth +Requires(post): update-alternatives +Requires(postun): update-alternatives BuildArch: noarch # SECTION test requirements BuildRequires: %{python_module pytest} @@ -48,16 +50,24 @@ put through an encode/decode cycle with different encodings. %install %python_install +%python_clone -a %{buildroot}%{_bindir}/ftfy %python_expand %fdupes %{buildroot}%{$python_sitelib} %check export PATH="$PATH:%{buildroot}%{_bindir}" -%pytest +# test_cli: ftfy binary not found (update-alternatives) +%pytest -k 'not test_cli' + +%post +%python_install_alternative ftfy + +%postun +%python_uninstall_alternative ftfy %files %{python_files} %doc CHANGELOG.md README.md %license LICENSE.txt -%python3_only %{_bindir}/ftfy +%python_alternative %{_bindir}/ftfy %{python_sitelib}/* %changelog