%global pypiname googletrans Name: python-%{pypiname} Version: 2.2.0 Release: 1%{?dist} Summary: Google Translate API for Python License: MIT License URL: https://github.com/ssut/py-googletrans Source0: https://files.pythonhosted.org/packages/source/g/%{pypiname}/%{pypiname}-%{version}.tar.gz BuildArch: noarch BuildRequires: python2-devel BuildRequires: python3-devel %description Googletrans is a free and unlimited python library that implemented Google Translate API. This uses the Google Translate Ajax API to make calls to such methods as detect and translate. %package -n python2-%{pypiname} Summary: Google Translate API for Python Requires: python2-requests %{?python_provide:%python_provide python2-%{pypiname}} %description -n python2-%{pypiname} Googletrans is a free and unlimited python library that implemented Google Translate API. This uses the Google Translate Ajax API to make calls to such methods as detect and translate. %package -n python3-%{pypiname} Summary: Google Translate API for Python Requires: python3-requests %{?python_provide:%python_provide python3-%{pypiname}} %description -n python3-%{pypiname} Googletrans is a free and unlimited python library that implemented Google Translate API. This uses the Google Translate Ajax API to make calls to such methods as detect and translate. %prep %setup -q -n %{pypiname}-%{version} %build %py2_build %py3_build %install %py2_install %py3_install %files -n python2-%{pypiname} %doc README.rst %{python2_sitelib}/* %files -n python3-%{pypiname} %doc README.rst %{python3_sitelib}/* %{_bindir}/* %changelog * Tue Dec 26 2017 williamjmorenor@gmail.com - 2.2.0-1 - Initial packaging