%global pkgname PyDrive %global sum A wrapper library of google-api-python-client for Google Drive API tasks %if 0%{?fedora} >= 13 %global with_python3 1 %else %if 0%{?rhel} >= 8 %global with_python3 1 %endif %endif Name: PyDrive Version: 1.3.1 Release: 2%{?dist} Summary: %{sum} License: ASL 2.0 and BSD URL: https://pypi.python.org/pypi/PyDrive Source0: https://pypi.python.org/packages/52/e0/0e64788e5dd58ce2d6934549676243dc69d982f198524be9b99e9c2a4fd5/PyDrive-1.3.1.tar.gz BuildArch: noarch BuildRequires: python2-devel BuildRequires: python2-oauth2client >= 4.0.0 BuildRequires: PyYAML >= 3.0 BuildRequires: python2-google-api-client >= 1.2 %if 0%{?with_python3} BuildRequires: python3-devel BuildRequires: python3-oauth2client >= 4.0.0 BuildRequires: python3-PyYAML >= 3.0 BuildRequires: python3-google-api-client >= 1.2 %endif # if with_python3 %description An python module which provides a convenient example. %package -n python2-%{pkgname} Summary: %{sum} %{?python_provide:%python_provide python2-%{pkgname}} Requires: python2-oauth2client >= 4.0.0 Requires: python2-google-api-client >= 1.2 Requires: PyYAML >= 3.0 %description -n python2-%{pkgname} A wrapper library of google-api-python-client for Google Drive API tasks %if 0%{?with_python3} %package -n python3-%{pkgname} Summary: %{sum} %{?python_provide:%python_provide python3-%{pkgname}} Requires: python3-oauth2client >= 4.0.0 Requires: python3-google-api-client >= 1.2 Requires: python3-PyYAML >= 3.0 %description -n python3-%{pkgname} A wrapper library of google-api-python-client for Google Drive API tasks %endif # if with_python3 %prep %autosetup -n %{name}-%{version} %build %py2_build %if 0%{?with_python3} %py3_build %endif # if with_python3 %install # Must do the python2 install first because the scripts in /usr/bin are # overwritten with every setup.py install, and in general we want the # python3 version to be the default. # If, however, we're installing separate executables for python2 and python3, # the order needs to be reversed so the unversioned executable is the python2 one. %py2_install %if 0%{?with_python3} %py3_install %endif # if with_python3 # Note that there is no %%files section for the unversioned python module if we are building for several python runtimes %files -n python2-%{pkgname} %license LICENSE %{python2_sitelib}/* %if 0%{?with_python3} %files -n python3-%{pkgname} %license LICENSE %{python3_sitelib}/* %endif # if with_python3 %changelog * Fri Aug 4 2017 Nick Bebout - 1.3.1-2 - Update for review issues * Fri Aug 4 2017 Nick Bebout - 1.3.1-1 - Initial release