diff --git a/python-gTTS.changes b/python-gTTS.changes index e7d94ed..e39aef8 100644 --- a/python-gTTS.changes +++ b/python-gTTS.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue May 26 06:34:32 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + ------------------------------------------------------------------- Mon Apr 6 09:24:58 UTC 2020 - Marketa Calabkova diff --git a/python-gTTS.spec b/python-gTTS.spec index 276a3a9..7997f82 100644 --- a/python-gTTS.spec +++ b/python-gTTS.spec @@ -43,6 +43,8 @@ Requires: python-gTTS-token >= 1.1.3 Requires: python-requests Requires: python-setuptools Requires: python-six +Requires(post): update-alternatives +Requires(postun): update-alternatives BuildArch: noarch %python_subpackages @@ -61,16 +63,23 @@ sentences where the speech would naturally pause. %install %python_install +%python_clone -a %{buildroot}%{_bindir}/gtts-cli %python_expand %fdupes %{buildroot}%{$python_sitelib} %check # tests are sadly mostly online #%%pytest +%post +%python_install_alternative gtts-cli + +%postun +%python_uninstall_alternative gtts-cli + %files %{python_files} %doc CHANGELOG.rst README.md %license LICENSE -%python3_only %{_bindir}/gtts-cli +%python_alternative %{_bindir}/gtts-cli %{python_sitelib}/* %changelog