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