From bdec915465d18c6f4e385c52b8a0259aa4c4496a3bcfde7fcf3c74dcdf9fcb21 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:05:51 +0000 Subject: [PATCH] Accepting request 809271 from home:pgajdos:python submit OBS-URL: https://build.opensuse.org/request/show/809271 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-gTTS?expand=0&rev=12 --- python-gTTS.changes | 5 +++++ python-gTTS.spec | 11 ++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) 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