# Python3 support in OpenStack starts with version 3.5, # which is only in Fedora 24+ %if 0%{?fedora} >= 24 %global with_python3 1 %endif %global library google-auth Name: python-%{library} Version: 1.1.1 Release: 1%{?dist} Summary: Google Auth Python Library License: ASL 2.0 URL: https://github.com/GoogleCloudPlatform/google-auth-library-python Source0: https://github.com/GoogleCloudPlatform/google-auth-library-python/archive/%{library}-%{version}.tar.gz BuildArch: noarch %description Google Auth Python Library %package -n python2-%{library} Summary: Google Auth Python Library %{?python_provide:%python_provide python2-%{library}} BuildRequires: python2-devel BuildRequires: python-setuptools BuildRequires: git Requires: python-pyasn1 Requires: python-pyasn1-modules Requires: python-rsa Requires: python-six Requires: python-cachetools %description -n python2-%{library} Google Auth Python Library %if 0%{?with_python3} %package -n python3-%{library} Summary: Google Auth Python Library %{?python_provide:%python_provide python3-%{library}} BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: git Requires: python3-pyasn1 Requires: python3-pyasn1-modules Requires: python3-rsa Requires: python3-six Requires: python3-cachetools %description -n python3-%{library} Python client for the kubernetes API. %endif # with_python3 %prep %autosetup -n google-auth-library-python-%{version} -S git # Let's handle dependencies ourseleves %build %py2_build %if 0%{?with_python3} %py3_build %endif %install %py2_install %if 0%{?with_python3} %py3_install %endif %check %files -n python2-%{library} %license LICENSE %{python2_sitelib}/google/auth %{python2_sitelib}/google/oauth2 %{python2_sitelib}/google_auth-%{version}*.egg-info %{python2_sitelib}/google_auth-%{version}*.pth %if 0%{?with_python3} %files -n python3-%{library} %license LICENSE %{python3_sitelib}/google/auth %{python3_sitelib}/google/oauth2 %{python3_sitelib}/google_auth-%{version}*.egg-info %{python3_sitelib}/google_auth-%{version}*.pth %endif %changelog * Fri Oct 13 2017 Jason Montleon 1.1.1-1 - Initial Build