Initial upload
This commit is contained in:
parent
b988de07ee
commit
6a0e7e8eb3
1
.gitignore
vendored
1
.gitignore
vendored
@ -0,0 +1 @@
|
|||||||
|
/oauth2client-1.4.11.tar.gz
|
||||||
30
docs-build-fix.patch
Normal file
30
docs-build-fix.patch
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
diff -up oauth2client-1.4.11/docs/conf.py.orig oauth2client-1.4.11/docs/conf.py
|
||||||
|
--- oauth2client-1.4.11/docs/conf.py.orig 2015-06-04 11:46:53.746947248 +0200
|
||||||
|
+++ oauth2client-1.4.11/docs/conf.py 2015-06-04 11:47:08.138033410 +0200
|
||||||
|
@@ -12,7 +12,7 @@ import os
|
||||||
|
extensions = [
|
||||||
|
'sphinx.ext.autodoc',
|
||||||
|
'sphinx.ext.coverage',
|
||||||
|
- 'sphinx.ext.napoleon',
|
||||||
|
+ 'sphinxcontrib.napoleon',
|
||||||
|
'sphinx.ext.viewcode',
|
||||||
|
]
|
||||||
|
templates_path = ['_templates']
|
||||||
|
diff -up oauth2client-1.4.11/docs/source/oauth2client.rst.orig oauth2client-1.4.11/docs/source/oauth2client.rst
|
||||||
|
--- oauth2client-1.4.11/docs/source/oauth2client.rst.orig 2015-06-04 11:46:40.402867355 +0200
|
||||||
|
+++ oauth2client-1.4.11/docs/source/oauth2client.rst 2015-06-04 11:46:47.233908254 +0200
|
||||||
|
@@ -4,14 +4,6 @@ oauth2client package
|
||||||
|
Submodules
|
||||||
|
----------
|
||||||
|
|
||||||
|
-oauth2client.appengine module
|
||||||
|
------------------------------
|
||||||
|
-
|
||||||
|
-.. automodule:: oauth2client.appengine
|
||||||
|
- :members:
|
||||||
|
- :undoc-members:
|
||||||
|
- :show-inheritance:
|
||||||
|
-
|
||||||
|
oauth2client.client module
|
||||||
|
--------------------------
|
||||||
|
|
||||||
147
python-oauth2client.spec
Normal file
147
python-oauth2client.spec
Normal file
@ -0,0 +1,147 @@
|
|||||||
|
%global realname oauth2client
|
||||||
|
# Share doc between python- and python3-
|
||||||
|
%global _docdir_fmt %{name}
|
||||||
|
|
||||||
|
|
||||||
|
%if 0%{?fedora}
|
||||||
|
%bcond_without python3
|
||||||
|
%else
|
||||||
|
%bcond_with python3
|
||||||
|
%endif
|
||||||
|
|
||||||
|
Name: python-%{realname}
|
||||||
|
Version: 1.4.11
|
||||||
|
Release: 2%{?dist}
|
||||||
|
Summary: Python client library for OAuth 2.0
|
||||||
|
|
||||||
|
Group: Development/Languages
|
||||||
|
License: ASL 2.0
|
||||||
|
URL: https://github.com/google/oauth2client
|
||||||
|
Source0: https://github.com/google/%{realname}/archive/v%{version}.tar.gz#/%{realname}-%{version}.tar.gz
|
||||||
|
Patch0: remove-python-shebang-from-module.patch
|
||||||
|
Patch1: docs-build-fix.patch
|
||||||
|
|
||||||
|
BuildArch: noarch
|
||||||
|
BuildRequires: python2-devel
|
||||||
|
BuildRequires: python-setuptools
|
||||||
|
# Needed for docs build
|
||||||
|
BuildRequires: pyOpenSSL
|
||||||
|
BuildRequires: python-django
|
||||||
|
BuildRequires: python-gflags
|
||||||
|
BuildRequires: python-httplib2
|
||||||
|
BuildRequires: python-keyring
|
||||||
|
BuildRequires: python-pyasn1
|
||||||
|
BuildRequires: python-pyasn1-modules
|
||||||
|
BuildRequires: python-rsa
|
||||||
|
BuildRequires: python-six
|
||||||
|
BuildRequires: python-sphinxcontrib-napoleon
|
||||||
|
BuildRequires: python-sphinx_rtd_theme
|
||||||
|
%if %{with python3}
|
||||||
|
BuildRequires: python3-setuptools
|
||||||
|
BuildRequires: python3-devel
|
||||||
|
%endif
|
||||||
|
|
||||||
|
Requires: pyOpenSSL
|
||||||
|
Requires: python-gflags
|
||||||
|
Requires: python-httplib2
|
||||||
|
Requires: python-keyring
|
||||||
|
Requires: python-pyasn1
|
||||||
|
Requires: python-pyasn1-modules
|
||||||
|
Requires: python-rsa
|
||||||
|
Requires: python-six
|
||||||
|
|
||||||
|
|
||||||
|
%description
|
||||||
|
This is a python client module for accessing resources protected by OAuth 2.0
|
||||||
|
|
||||||
|
%if %{with python3}
|
||||||
|
%package -n python3-%{realname}
|
||||||
|
Summary: Python client library for OAuth 2.0
|
||||||
|
|
||||||
|
Requires: python3-pyOpenSSL
|
||||||
|
Requires: python3-gflags
|
||||||
|
Requires: python3-httplib2
|
||||||
|
Requires: python3-keyring
|
||||||
|
Requires: python3-pyasn1
|
||||||
|
Requires: python3-pyasn1-modules
|
||||||
|
Requires: python3-rsa
|
||||||
|
Requires: python3-six
|
||||||
|
|
||||||
|
%description -n python3-%{realname}
|
||||||
|
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 %{realname}-%{version}
|
||||||
|
%patch0 -p1
|
||||||
|
%patch1 -p1
|
||||||
|
|
||||||
|
# We do not have the package for google.appengine support
|
||||||
|
# This is removed because it breaks the docs build otherwise
|
||||||
|
rm oauth2client/appengine.py
|
||||||
|
|
||||||
|
%if %{with python3}
|
||||||
|
rm -rf %{py3dir}
|
||||||
|
cp -a . %{py3dir}
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%build
|
||||||
|
%{__python2} setup.py 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 -vrf docs/_build/html/_sources
|
||||||
|
rm -vrf docs/_build/html/_static/fonts
|
||||||
|
rm -fv docs/_build/html/{.buildinfo,objects.inv}
|
||||||
|
|
||||||
|
|
||||||
|
%if %{with python3}
|
||||||
|
pushd %{py3dir}
|
||||||
|
%{__python3} setup.py build
|
||||||
|
popd
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%install
|
||||||
|
%{__python2} setup.py install -O1 --skip-build --root %{buildroot}
|
||||||
|
|
||||||
|
%if %{with python3}
|
||||||
|
pushd %{py3dir}
|
||||||
|
%{__python3} setup.py install -O1 --skip-build --root %{buildroot}
|
||||||
|
popd
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%files
|
||||||
|
%license LICENSE
|
||||||
|
%doc CHANGELOG.md CONTRIBUTING.md README.md
|
||||||
|
%{python2_sitelib}/%{realname}
|
||||||
|
%{python2_sitelib}/%{realname}-%{version}-*.egg-info
|
||||||
|
|
||||||
|
%files doc
|
||||||
|
%doc docs/_build/html
|
||||||
|
|
||||||
|
%if %{with python3}
|
||||||
|
%files -n python3-%{realname}
|
||||||
|
%license LICENSE
|
||||||
|
%doc CHANGELOG.md CONTRIBUTING.md README.md
|
||||||
|
%{python3_sitelib}/%{realname}
|
||||||
|
%{python3_sitelib}/%{realname}*.egg-info
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Mon Jun 22 2015 Michele Baldessari <michele@acksyn.org> - 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 <michele@acksyn.org> - 1.4.11-1
|
||||||
|
- Initial packaging
|
||||||
9
remove-python-shebang-from-module.patch
Normal file
9
remove-python-shebang-from-module.patch
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
diff -up oauth2client-1.4.11/oauth2client/util.py.orig oauth2client-1.4.11/oauth2client/util.py
|
||||||
|
--- oauth2client-1.4.11/oauth2client/util.py.orig 2015-06-04 10:21:35.117139303 +0200
|
||||||
|
+++ oauth2client-1.4.11/oauth2client/util.py 2015-06-04 10:21:44.195196840 +0200
|
||||||
|
@@ -1,5 +1,3 @@
|
||||||
|
-#!/usr/bin/env python
|
||||||
|
-#
|
||||||
|
# Copyright 2014 Google Inc. All rights reserved.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
Loading…
Reference in New Issue
Block a user