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

Name:           gtts
Version:        1.1.7
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:  python-devel
BuildRequires:  python-setuptools
BuildRequires:  python3-devel
BuildRequires:  python3-setuptools
%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

%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

%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 Jan  4 2017 Peter Robinson <pbrobinson@fedoraproject.org> 1.1.7-1
- initial packaging