%global srcname oauth2client %global sum Python client library for OAuth 2.0 # Share doc between python- and python3- %global _docdir_fmt %{name} %if 0%{?fedora} %bcond_without python3 %else %bcond_with python3 %endif Name: python-%{srcname} Version: 3.0.0 Release: 4%{?dist} Summary: %{sum} Group: Development/Languages License: ASL 2.0 URL: https://github.com/google/%{srcname} Source0: https://github.com/google/%{srcname}/archive/v%{version}.tar.gz#/%{srcname}-%{version}.tar.gz Patch0: docs-build-fix.patch BuildArch: noarch BuildRequires: python2-devel BuildRequires: python2-setuptools # Needed for docs build BuildRequires: pyOpenSSL BuildRequires: python-crypto BuildRequires: python-django BuildRequires: python2-fasteners BuildRequires: python-flask BuildRequires: python2-gflags BuildRequires: python-httplib2 >= 0.9.1 BuildRequires: python-keyring BuildRequires: python-mock BuildRequires: python-nose BuildRequires: python2-pyasn1 >= 0.1.7 BuildRequires: python2-pyasn1-modules >= 0.0.5 BuildRequires: python-rsa >= 3.1.4 BuildRequires: python2-six >= 1.6.1 BuildRequires: python-sqlalchemy BuildRequires: python-sphinx > 1.3 BuildRequires: python-sphinx_rtd_theme BuildRequires: python-tox BuildRequires: python-unittest2 BuildRequires: python-webtest %if %{with python3} BuildRequires: python3-setuptools BuildRequires: python3-devel BuildRequires: python2-fasteners BuildRequires: python3-mock BuildRequires: python3-pyasn1 >= 0.1.7 BuildRequires: python3-pyasn1-modules >= 0.0.5 BuildRequires: python3-tox %endif %description This is a python client module for accessing resources protected by OAuth 2.0 %package -n python2-%{srcname} Summary: %{sum} %{?python_provide:%python_provide python2-%{srcname}} Requires: pyOpenSSL Requires: python2-gflags Requires: python2-fasteners Requires: python-httplib2 >= 0.9.1 Requires: python-keyring Requires: python2-pyasn1 >= 0.1.7 Requires: python2-pyasn1-modules >= 0.0.5 Requires: python-rsa >= 3.1.4 Requires: python2-six >= 1.6.1 %description -n python2-%{srcname} This is a python client module for accessing resources protected by OAuth 2.0 %if %{with python3} %package -n python3-%{srcname} Summary: %{sum} %{?python_provide:%python_provide python3-%{srcname}} Requires: python3-pyOpenSSL Requires: python3-gflags Requires: python3-fasteners Requires: python3-httplib2 >= 0.9.1 Requires: python3-keyring Requires: python3-pyasn1 >= 0.1.7 Requires: python3-pyasn1-modules >= 0.0.5 Requires: python3-rsa >= 3.1.4 Requires: python3-six >= 1.6.1 %description -n python3-%{srcname} This is a python client module for accessing resources protected by OAuth 2.0 %endif %package doc Summary: Documentation for python oauth2client %description doc The python-oauth2client-doc package provides the documentation for the package. Documentation is shipped in html format. %prep %setup -q -n %{srcname}-%{version} %patch0 -p1 -b .doc # We do not have the package for google.appengine support # This is removed because it breaks the docs build otherwise rm -f docs/source/oauth2client.contrib.appengine.rst oauth2client/appengine.py %if %{with python3} rm -rf %{py3dir} cp -a . %{py3dir} %endif %build %py2_build export PYTHONPATH=`pwd` pushd docs # Not running with smp_flags as sometimes sphinx fails when run # with parallel make make html popd unset PYTHONPATH rm -vr docs/_build/html/_sources rm -vr docs/_build/html/_static/fonts rm -v docs/_build/html/{.buildinfo,objects.inv} %if %{with python3} pushd %{py3dir} %py3_build %endif %install %py2_install %if %{with python3} pushd %{py3dir} %py3_install popd %endif %check tox -v --sitepackages -e py27 %if %{with python3} pushd %{py3dir} #python3-tox --sitepackages -e py35 popd %endif # We remove tests currently, we will ship them eventually # This is a bit of a hack until I package the test scripts in a separate package rm -r $(find %{_buildrootdir} -type d -name 'tests') %files -n python2-%{srcname} %license LICENSE %doc CHANGELOG.md CONTRIBUTING.md README.md %{python2_sitelib}/%{srcname} %{python2_sitelib}/%{srcname}-%{version}-*.egg-info %files doc %doc docs/_build/html %if %{with python3} %files -n python3-%{srcname} %license LICENSE %doc CHANGELOG.md CONTRIBUTING.md README.md %{python3_sitelib}/%{srcname} %{python3_sitelib}/%{srcname}*.egg-info %endif %changelog * Sat Feb 11 2017 Fedora Release Engineering - 3.0.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Tue Dec 27 2016 Michele Baldessari - 3.0.0-3 - Fix python 3.6 breakage * Mon Dec 19 2016 Miro HronĨok - 3.0.0-2 - Rebuild for Python 3.6 * Thu Nov 10 2016 Michele Baldessari - 3.0.0-1 - New upstream * Tue Jul 19 2016 Fedora Release Engineering - 2.1.0-2 - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages * Sun May 22 2016 Michele Baldessari - 2.1.0-1 - New upstream * Tue Mar 08 2016 Michele Baldessari - 2.0.1-1 - New upstream (NB: for now I am not shipping the tests, to be revised later) * Thu Feb 04 2016 Fedora Release Engineering - 1.5.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Thu Nov 26 2015 Michele Baldessari - 1.5.2-2 - Remove dependency on sphinx-contrib-napoleon now that sphinx is at version >= 1.3 - Tighten versioned dependencies - Update to latest python policy * Thu Nov 19 2015 Michele Baldessari - 1.5.2-1 - New upstream (BZ 1283443) * Tue Nov 10 2015 Fedora Release Engineering - 1.5.1-3 - Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5 * Tue Oct 13 2015 Michele Baldessari - 1.5.1-2 - Add versioned requires as per setup.py * Thu Sep 17 2015 Michele Baldessari - 1.5.1-1 - New upstream (BZ#1263881) * Fri Sep 04 2015 Michele Baldessari - 1.5.0-1 - New upstream (BZ#1259966) * Sun Jul 12 2015 Michele Baldessari - 1.4.12-1 - New upstream (BZ#1241304) * Mon Jun 22 2015 Michele Baldessari - 1.4.11-2 - Use -O1 for python3 as well - Use python2 macros - Remove the extra fonts from the -doc package * Thu Jun 04 2015 Michele Baldessari - 1.4.11-1 - Initial packaging