From a4b16feee08e7d6e749cf416634c8778ac369d9fa1ebd23262a19028358d5d4a Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Sat, 4 Feb 2023 19:24:50 +0000 Subject: [PATCH] Accepting request 1063197 from home:mcepl:branches:devel:languages:python - Update to 2.3.1: - Bug fixes: - test: include missing required *.txt test files in dist - loosen dependancies for click and requests, removes six dependancy - test: missing @pytest.mark.net on net-enabled test - test: remove mock package test dependancy Features - Centralize project metadata and config into a single pyproject.toml - Drop support for Python 2.7 (long overdue), Python 3.6 (end-of-life) - Modernize package config and build/release workflow - Simplify language generator - Languages added: zh-CN (Chinese (Simplified)), zh-TW (Chinese (Traditional)) - Languages removed: cy (Welsh), eo (Esperanto), mk (Macedonian), ms (Malay), zh-CN (Chinese) - Remove upstreamed patches: - denose.patch - network-tests.patch OBS-URL: https://build.opensuse.org/request/show/1063197 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-gTTS?expand=0&rev=21 --- demock.patch | 26 -------------------------- gTTS-2.2.4.tar.gz | 3 --- gTTS-2.3.1.tar.gz | 3 +++ network-tests.patch | 14 -------------- python-gTTS.changes | 25 +++++++++++++++++++++++++ python-gTTS.spec | 29 ++++++++++++++--------------- 6 files changed, 42 insertions(+), 58 deletions(-) delete mode 100644 demock.patch delete mode 100644 gTTS-2.2.4.tar.gz create mode 100644 gTTS-2.3.1.tar.gz delete mode 100644 network-tests.patch diff --git a/demock.patch b/demock.patch deleted file mode 100644 index 1c5a13f..0000000 --- a/demock.patch +++ /dev/null @@ -1,26 +0,0 @@ ---- - gtts/tests/test_tts.py | 2 +- - setup.cfg | 1 - - 2 files changed, 1 insertion(+), 2 deletions(-) - ---- a/gtts/tests/test_tts.py -+++ b/gtts/tests/test_tts.py -@@ -1,7 +1,7 @@ - # -*- coding: utf-8 -*- - import os - import pytest --from mock import Mock -+from unittest.mock import Mock - from six.moves import urllib - - from gtts.tts import gTTS, gTTSError ---- a/setup.cfg -+++ b/setup.cfg -@@ -45,7 +45,6 @@ tests = - pytest-cov - flake8 - testfixtures -- mock - six - docs = - sphinx diff --git a/gTTS-2.2.4.tar.gz b/gTTS-2.2.4.tar.gz deleted file mode 100644 index d5f541d..0000000 --- a/gTTS-2.2.4.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e0b688ff777928afe280c3cf4d36bc7b794e93e86851b680d54ba2fb68e88456 -size 37695 diff --git a/gTTS-2.3.1.tar.gz b/gTTS-2.3.1.tar.gz new file mode 100644 index 0000000..9a5337a --- /dev/null +++ b/gTTS-2.3.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e3764195ccb210b313ba6662083aa85e5cb39a918078048322227c46d3440a0a +size 39623 diff --git a/network-tests.patch b/network-tests.patch deleted file mode 100644 index 0e8918c..0000000 --- a/network-tests.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- - gtts/tests/test_tts.py | 1 + - 1 file changed, 1 insertion(+) - ---- a/gtts/tests/test_tts.py -+++ b/gtts/tests/test_tts.py -@@ -84,6 +84,7 @@ def test_no_text_parts(tmp_path): - # Test write_to_fp()/save() cases not covered elsewhere in this file - - -+@pytest.mark.net - def test_bad_fp_type(): - """Raise TypeError if fp is not a file-like object (no .write())""" - # Create gTTS and save diff --git a/python-gTTS.changes b/python-gTTS.changes index 848539e..ea25906 100644 --- a/python-gTTS.changes +++ b/python-gTTS.changes @@ -1,3 +1,28 @@ +------------------------------------------------------------------- +Sat Feb 4 18:39:05 UTC 2023 - Matej Cepl + +- Update to 2.3.1: + - Bug fixes: + - test: include missing required *.txt test files in dist + - loosen dependancies for click and requests, removes six + dependancy + - test: missing @pytest.mark.net on net-enabled test + - test: remove mock package test dependancy +Features + - Centralize project metadata and config into a single + pyproject.toml + - Drop support for Python 2.7 (long overdue), Python 3.6 + (end-of-life) + - Modernize package config and build/release workflow + - Simplify language generator + - Languages added: zh-CN (Chinese (Simplified)), zh-TW + (Chinese (Traditional)) + - Languages removed: cy (Welsh), eo (Esperanto), mk + (Macedonian), ms (Malay), zh-CN (Chinese) +- Remove upstreamed patches: + - denose.patch + - network-tests.patch + ------------------------------------------------------------------- Mon Mar 21 14:46:30 UTC 2022 - Matej Cepl diff --git a/python-gTTS.spec b/python-gTTS.spec index eb37ee8..4d67dc5 100644 --- a/python-gTTS.spec +++ b/python-gTTS.spec @@ -1,7 +1,7 @@ # # spec file for package python-gTTS # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,29 +16,27 @@ # -%{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-gTTS -Version: 2.2.4 +Version: 2.3.1 Release: 0 Summary: Python module to create MP3 files from spoken text via the Google TTS API License: MIT Group: Development/Languages/Python URL: https://github.com/pndurette/gTTS Source: https://github.com/pndurette/gTTS/archive/refs/tags/v%{version}.tar.gz#/gTTS-%{version}.tar.gz -# PATCH-FIX-UPSTREAM demock.patch gh#pndurette/gTTS#343 mcepl@suse.com -# remove dependency on the external mock package -Patch0: demock.patch -# PATCH-FIX-UPSTREAM network-tests.patch gh#pndurette/gTTS#344 mcepl@suse.com -# one more test marked as the network requiring -Patch1: network-tests.patch +BuildRequires: %{python_module Sphinx} +BuildRequires: %{python_module base >= 3.7} BuildRequires: %{python_module beautifulsoup4} BuildRequires: %{python_module click} BuildRequires: %{python_module gTTS-token >= 1.1.3} +BuildRequires: %{python_module pip} BuildRequires: %{python_module pytest >= 3.9} BuildRequires: %{python_module requests} -BuildRequires: %{python_module setuptools >= 38.6} -BuildRequires: %{python_module six} +BuildRequires: %{python_module sphinx-click} +BuildRequires: %{python_module sphinx_mdinclude} +BuildRequires: %{python_module sphinx_rtd_theme} BuildRequires: %{python_module testfixtures} +BuildRequires: %{python_module wheel} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-beautifulsoup4 @@ -62,10 +60,10 @@ sentences where the speech would naturally pause. %autosetup -p1 -n gTTS-%{version} %build -%python_build +%pyproject_wheel %install -%python_install +%pyproject_install %python_clone -a %{buildroot}%{_bindir}/gtts-cli %python_expand %fdupes %{buildroot}%{$python_sitelib} @@ -80,9 +78,10 @@ sentences where the speech would naturally pause. %python_uninstall_alternative gtts-cli %files %{python_files} -%doc CHANGELOG.rst README.md +%doc CHANGELOG.md README.md %license LICENSE %python_alternative %{_bindir}/gtts-cli -%{python_sitelib}/* +%{python_sitelib}/gtts +%{python_sitelib}/gTTS-%{version}*-info %changelog