%global pypi_name gTTS-token
# Needs access to Google Services so doesn't run in koji
%global with_tests 0
Name: gtts-token
Version: 1.1.1
Release: 4%{?dist}
Summary: Calculates a token to run the Google Translate text to speech
# LICENSE file is currently missing, already reported upstream
# https://github.com/Boudewijn26/gTTS-token/issues/5
License: MIT
URL: https://github.com/boudewijn26/gTTS-token
Source0: https://pypi.python.org/packages/4c/c8/dd58eba1464729095217d3acfc4f6581348c6f495ea3342ed7dbc9f9e133/%{pypi_name}-%{version}.zip
Source1: https://raw.githubusercontent.com/Boudewijn26/gTTS-token/master/LICENSE
BuildArch: noarch
BuildRequires: python2-devel
BuildRequires: python2-setuptools
BuildRequires: python2-requests
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-requests
%if 0%{?with_tests}
BuildRequires: python2-pytest
BuildRequires: python3-pytest
%endif
%description
gTTS-token (Google Text to Speech token): A python implementation of the token
validation of Google Translate
%package -n python2-gtts-token
Summary: Python 2 lib to Calculates a token to run the Google Translate text to speech
%{?python_provide:%python_provide python2-gtts-token}
Requires: python2-requests
%description -n python2-gtts-token
gTTS-token (Google Text to Speech token): A python implementation of the token
validation of Google Translate
%package -n python3-gtts-token
Summary: Python 3 lib to Calculates a token to run the Google Translate text to speech
%{?python_provide:%python_provide python3-gtts-token}
Requires: python3-requests
%description -n python3-gtts-token
gTTS-token (Google Text to Speech token): A python implementation of the token
validation of Google Translate
%prep
%setup -q -n %{pypi_name}-%{version}
# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info
cp %{SOURCE1} .
%build
%py2_build
%py3_build
%install
%py2_install
%py3_install
%check
%if %{with_tests}
%{__python2} setup.py test
%{__python3} setup.py test
%endif
%files -n python2-gtts-token
%license LICENSE
%{python_sitelib}/gTTS_token-*
%{python_sitelib}/gtts_token/*
%files -n python3-gtts-token
%license LICENSE
%{python3_sitelib}/gTTS_token-*
%{python3_sitelib}/gtts_token/*
%changelog
* Fri Jan 05 2018 Iryna Shcherbina <ishcherb@redhat.com> - 1.1.1-4
- Update Python 2 dependency declarations to new packaging standards
(See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Sun Mar 19 2017 Peter Robinson <pbrobinson@fedoraproject.org> 1.1.1-2
- Package review updates
* Tue Feb 7 2017 Peter Robinson <pbrobinson@fedoraproject.org> 1.1.1-1
- initial packaging