File pr-201.patch of Package python-google-api-python-client

From bb324623419a22fb14da1e22a847b6b09a178aad Mon Sep 17 00:00:00 2001
From: Thomas Bechtold <tbechtold@suse.com>
Date: Mon, 14 Mar 2016 19:17:59 +0100
Subject: [PATCH] Allow using oauth2client versions < 2

Be compatible with older oauth2client versions. This simplifies
the installation (also for downstream) when software needs an older
oauth2client version but also wants to use googleapiclient.
---
 googleapiclient/discovery_cache/file_cache.py | 6 +++++-
 setup.py                                      | 2 +-
 tox.ini                                       | 7 +++++--
 3 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/googleapiclient/discovery_cache/file_cache.py b/googleapiclient/discovery_cache/file_cache.py
index 8b0301d..7526ed9 100644
--- a/googleapiclient/discovery_cache/file_cache.py
+++ b/googleapiclient/discovery_cache/file_cache.py
@@ -29,7 +29,11 @@
 import tempfile
 import threading
 
-from oauth2client.contrib.locked_file import LockedFile
+try:
+  from oauth2client.contrib.locked_file import LockedFile
+except ImportError:
+  # oauth2client < 2.0.0
+  from oauth2client.locked_file import LockedFile
 
 from . import base
 from ..discovery_cache import DISCOVERY_DOC_MAX_AGE
diff --git a/setup.py b/setup.py
index d78f825..7dd6a0a 100644
--- a/setup.py
+++ b/setup.py
@@ -64,7 +64,7 @@ def _DetectBadness():
 
 install_requires = [
     'httplib2>=0.8,<1',
-    'oauth2client>=2.0.0,<3',
+    'oauth2client',
     'six>=1.6.1,<2',
     'uritemplate>=0.6,<1',
 ]
openSUSE Build Service is sponsored by