Skip to content

Commit

Permalink
Update python-gTTS to version 2.2.4 / rev 8 via SR 963733
Browse files Browse the repository at this point in the history
https://build.opensuse.org/request/show/963733
by user mcepl + dimstar_suse
- Make tests working at least a little bit. Requires two new patches:
  - demock.patch (gh#pndurette/gTTS#343)
  - network-tests.patch (gh#pndurette/gTTS#344)
- version update to 2.2.4
  2.2.4 (2022-03-14)
  ------------------
  Features
  ~~~~~~~
  - Added Malay language support (`#316 <https://github.com/pndurette/gTTS/issues/316>`_)
  - Added Hebrew language support (`#324 <https://github.com/pndurette/gTTS/issues/324>`_)
  - Added new ``gTTS.stream()`` method to stream bytes (`#319 <https://github.com/pndurette/gTTS/issues/319>`_)
  Misc
  ~~~
  - `#334 <https://github.com/pndurette/gTTS/issues/334>`_
  2.2.3 (2021-06-17)
  ------------------
  Features
  ~~~~~~~
  - Added Bulgarian language support (`#302 <https://github.com/pndurette/gTTS/issues/302>`_)
  2.2.2 (2021-02-03)
  --------
  • Loading branch information
mcepl authored and bmwiedemann committed Mar 21, 2022
1 parent 152b85d commit ccde706
Show file tree
Hide file tree
Showing 8 changed files with 151 additions and 8 deletions.
Binary file modified packages/p/python-gTTS/.files
Binary file not shown.
49 changes: 49 additions & 0 deletions packages/p/python-gTTS/.rev
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,53 @@
</comment>
<requestid>870610</requestid>
</revision>
<revision rev="8" vrev="1">
<srcmd5>d2c9201cb473b819e5fa46014a164c76</srcmd5>
<version>2.2.4</version>
<time>1647889997</time>
<user>dimstar_suse</user>
<comment>- Make tests working at least a little bit. Requires two new patches:
- demock.patch (gh#pndurette/gTTS#343)
- network-tests.patch (gh#pndurette/gTTS#344)
- version update to 2.2.4
2.2.4 (2022-03-14)
------------------
Features
~~~~~~~
- Added Malay language support (`#316 &lt;https://github.com/pndurette/gTTS/issues/316&gt;`_)
- Added Hebrew language support (`#324 &lt;https://github.com/pndurette/gTTS/issues/324&gt;`_)
- Added new ``gTTS.stream()`` method to stream bytes (`#319 &lt;https://github.com/pndurette/gTTS/issues/319&gt;`_)
Misc
~~~
- `#334 &lt;https://github.com/pndurette/gTTS/issues/334&gt;`_
2.2.3 (2021-06-17)
------------------
Features
~~~~~~~
- Added Bulgarian language support (`#302 &lt;https://github.com/pndurette/gTTS/issues/302&gt;`_)
2.2.2 (2021-02-03)
------------------
Features
~~~~~~~
- Adds a language fallback feature for deprecated languages to maintain compatiblity
(e.g. ``en-us`` becomes ``en``). Fallback can be disabled with ``lang_check=False``
or ``--nocheck`` for the cli (`#267 &lt;https://github.com/pndurette/gTTS/issues/267&gt;`_)
Bugfixes
~~~~~~~
- Fix Python 2.7 compatiblity (!). Python 2 is long gone, but the cut wasn't clearly communicated
for gTTS, so it was restored. Python 2 support will be completely removed in the next major release.
(`#255 &lt;https://github.com/pndurette/gTTS/issues/255&gt;`_)
- Language code case sensitivity is maintained throughout (`#267 &lt;https://github.com/pndurette/gTTS/issues/267&gt;`_)
Deprecations and Removals
~~~~~~~~~~~~~~~~~~~~~~~~
- The following list of 'hyphenated' language codes no longer work and have been removed: ``en-us``, ``en-ca``,
``en-uk``, ``en-gb``, ``en-au``, ``en-gh``, ``en-in``, ``en-ie``, ``en-nz``, ``en-ng``, ``en-ph``, ``en-za``,
``en-tz``, ``fr-ca``, ``fr-fr``, ``pt-br``, ``pt-pt``, ``es-es``, ``es-us``, ``zh-cn``, ``zh-tw``
(`#267 &lt;https://github.com/pndurette/gTTS/issues/267&gt;`_)
- Removed the ``gtts.get_url()`` method (outdated since ``2.1.0``)
(`#270 &lt;https://github.com/pndurette/gTTS/issues/270&gt;`_)
- do not require python-mock for build, testsuite is not run
</comment>
<requestid>963733</requestid>
</revision>
</revisionlist>
26 changes: 26 additions & 0 deletions packages/p/python-gTTS/demock.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
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
1 change: 0 additions & 1 deletion packages/p/python-gTTS/gTTS-2.2.2.tar.gz

This file was deleted.

1 change: 1 addition & 0 deletions packages/p/python-gTTS/gTTS-2.2.4.tar.gz
14 changes: 14 additions & 0 deletions packages/p/python-gTTS/network-tests.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
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
49 changes: 49 additions & 0 deletions packages/p/python-gTTS/python-gTTS.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,52 @@
-------------------------------------------------------------------
Mon Mar 21 14:46:30 UTC 2022 - Matej Cepl <mcepl@suse.com>

- Make tests working at least a little bit. Requires two new patches:
- demock.patch (gh#pndurette/gTTS#343)
- network-tests.patch (gh#pndurette/gTTS#344)

-------------------------------------------------------------------
Mon Mar 21 13:27:59 UTC 2022 - pgajdos@suse.com

- version update to 2.2.4
2.2.4 (2022-03-14)
------------------
Features
~~~~~~~
- Added Malay language support (`#316 <https://github.com/pndurette/gTTS/issues/316>`_)
- Added Hebrew language support (`#324 <https://github.com/pndurette/gTTS/issues/324>`_)
- Added new ``gTTS.stream()`` method to stream bytes (`#319 <https://github.com/pndurette/gTTS/issues/319>`_)
Misc
~~~
- `#334 <https://github.com/pndurette/gTTS/issues/334>`_
2.2.3 (2021-06-17)
------------------
Features
~~~~~~~
- Added Bulgarian language support (`#302 <https://github.com/pndurette/gTTS/issues/302>`_)
2.2.2 (2021-02-03)
------------------
Features
~~~~~~~
- Adds a language fallback feature for deprecated languages to maintain compatiblity
(e.g. ``en-us`` becomes ``en``). Fallback can be disabled with ``lang_check=False``
or ``--nocheck`` for the cli (`#267 <https://github.com/pndurette/gTTS/issues/267>`_)
Bugfixes
~~~~~~~
- Fix Python 2.7 compatiblity (!). Python 2 is long gone, but the cut wasn't clearly communicated
for gTTS, so it was restored. Python 2 support will be completely removed in the next major release.
(`#255 <https://github.com/pndurette/gTTS/issues/255>`_)
- Language code case sensitivity is maintained throughout (`#267 <https://github.com/pndurette/gTTS/issues/267>`_)
Deprecations and Removals
~~~~~~~~~~~~~~~~~~~~~~~~
- The following list of 'hyphenated' language codes no longer work and have been removed: ``en-us``, ``en-ca``,
``en-uk``, ``en-gb``, ``en-au``, ``en-gh``, ``en-in``, ``en-ie``, ``en-nz``, ``en-ng``, ``en-ph``, ``en-za``,
``en-tz``, ``fr-ca``, ``fr-fr``, ``pt-br``, ``pt-pt``, ``es-es``, ``es-us``, ``zh-cn``, ``zh-tw``
(`#267 <https://github.com/pndurette/gTTS/issues/267>`_)
- Removed the ``gtts.get_url()`` method (outdated since ``2.1.0``)
(`#270 <https://github.com/pndurette/gTTS/issues/270>`_)
- do not require python-mock for build, testsuite is not run

-------------------------------------------------------------------
Tue Feb 9 07:00:03 UTC 2021 - Adrian Schröter <adrian@suse.de>

Expand Down
19 changes: 12 additions & 7 deletions packages/p/python-gTTS/python-gTTS.spec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# spec file for package python-gTTS
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
Expand All @@ -18,17 +18,22 @@

%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-gTTS
Version: 2.2.2
Version: 2.2.4
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://files.pythonhosted.org/packages/source/g/gTTS/gTTS-%{version}.tar.gz
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 beautifulsoup4}
BuildRequires: %{python_module click}
BuildRequires: %{python_module gTTS-token >= 1.1.3}
BuildRequires: %{python_module mock}
BuildRequires: %{python_module pytest >= 3.9}
BuildRequires: %{python_module requests}
BuildRequires: %{python_module setuptools >= 38.6}
Expand All @@ -43,7 +48,7 @@ Requires: python-requests
Requires: python-setuptools
Requires: python-six
Requires(post): update-alternatives
Requires(postun): update-alternatives
Requires(postun):update-alternatives
BuildArch: noarch
%python_subpackages

Expand All @@ -54,7 +59,7 @@ utility. It allows unlimited lengths to be spoken by tokenizing long
sentences where the speech would naturally pause.

%prep
%setup -q -n gTTS-%{version}
%autosetup -p1 -n gTTS-%{version}

%build
%python_build
Expand All @@ -66,7 +71,7 @@ sentences where the speech would naturally pause.

%check
# tests are sadly mostly online
#%%pytest
%pytest -k 'not net'

%post
%python_install_alternative gtts-cli
Expand Down

0 comments on commit ccde706

Please sign in to comment.