Blob Blame History Raw
# Needs access to Google Services so doesn't run in koji
%global with_tests 0

Name:           gtts
Version:        1.2.2
Release:        1%{?dist}
Summary:        Create an mp3 file from spoken text via the Google TTS API

License:        MIT
URL:            https://github.com/pndurette/gTTS
Source0:        https://github.com/pndurette/gTTS/archive/v%{version}.tar.gz

BuildArch: noarch
BuildRequires:  python2-devel
BuildRequires:  python2-setuptools
BuildRequires:  python2-six
BuildRequires:  python3-devel
BuildRequires:  python3-setuptools
BuildRequires:  python3-six
%if 0%{?with_tests}
BuildRequires:  python2-pytest
BuildRequires:  python3-pytest
%endif

Requires:       python3-gtts

%description
gTTS (Google Text to Speech): A cli interface for Google's Text to Speech API. 
Create an mp3 file with the gtts-cli command line utility. It allows 
unlimited lengths to be spoken by tokenizing long sentences where the speech 
would naturally pause.

%package -n python2-gtts
Summary:  Library for Python 2 and 3 to communicate with the Google gtts
%{?python_provide:%python_provide python2-gtts}

Requires: python2-requests
Requires: python2-gtts-token

%description -n python2-gtts
gTTS (Google Text to Speech): Python2 interface for Google's Text to Speech API. 
Create an mp3 file with the python2 gTTS module. It allows unlimited lengths to 
be spoken by tokenizing long sentences where the speech would naturally pause.

%package -n python3-gtts
Summary:  Library for Python 3 to communicate with the Google gtts
%{?python_provide:%python_provide python3-gtts}

Requires: python3-requests
Requires: python3-gtts-token

%description -n python3-gtts
gTTS (Google Text to Speech): Python3 interface for Google's Text to Speech API. 
Create an mp3 file with the python3 gTTS module. It allows unlimited lengths to 
be spoken by tokenizing long sentences where the speech would naturally pause.

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

%build
%py2_build
%py3_build

%install
%py2_install
%py3_install

%check
%if %{with_tests}
%{__python2} setup.py test
%{__python3} setup.py test
%endif

%files
%{_bindir}/gtts-cli*

%files -n python2-gtts
%license LICENSE
%{python_sitelib}/*

%files -n python3-gtts
%license LICENSE
%{python3_sitelib}/*

%changelog
* Wed Aug 16 2017 Peter Robinson <pbrobinson@fedoraproject.org> 1.2.2-1
- Update to 1.2.2

* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Sun Apr 16 2017 Peter Robinson <pbrobinson@fedoraproject.org> 1.2.0-1
- Update to 1.2.0

* Sun Mar 19 2017 Peter Robinson <pbrobinson@fedoraproject.org> 1.1.8-3
- Depend on gtts-token

* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.8-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Mon Jan 23 2017 Peter Robinson <pbrobinson@fedoraproject.org> 1.1.8-1
- Update to 1.1.8

* Wed Jan  4 2017 Peter Robinson <pbrobinson@fedoraproject.org> 1.1.7-1
- initial packaging