Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Unified Diff: third_party/google_api_python_client/apiclient/__init__.py

Issue 963953003: OAuth2 support in depot_tools (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: restore git_cl Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/google_api_python_client/__init__.py ('k') | third_party/google_api_python_client/describe.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/google_api_python_client/apiclient/__init__.py
diff --git a/third_party/google_api_python_client/apiclient/__init__.py b/third_party/google_api_python_client/apiclient/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..5efb142e01e4b227e38572a16084c02336e9be68
--- /dev/null
+++ b/third_party/google_api_python_client/apiclient/__init__.py
@@ -0,0 +1,40 @@
+"""Retain apiclient as an alias for googleapiclient."""
+
+import googleapiclient
+
+try:
+ import oauth2client
+except ImportError:
+ raise RuntimeError(
+ 'Previous version of google-api-python-client detected; due to a '
+ 'packaging issue, we cannot perform an in-place upgrade. To repair, '
+ 'remove and reinstall this package, along with oauth2client and '
+ 'uritemplate. One can do this with pip via\n'
+ ' pip install -I google-api-python-client'
+ )
+
+from googleapiclient import channel
+from googleapiclient import discovery
+from googleapiclient import errors
+from googleapiclient import http
+from googleapiclient import mimeparse
+from googleapiclient import model
+from googleapiclient import sample_tools
+from googleapiclient import schema
+
+__version__ = googleapiclient.__version__
+
+_SUBMODULES = {
+ 'channel': channel,
+ 'discovery': discovery,
+ 'errors': errors,
+ 'http': http,
+ 'mimeparse': mimeparse,
+ 'model': model,
+ 'sample_tools': sample_tools,
+ 'schema': schema,
+}
+
+import sys
+for module_name, module in _SUBMODULES.iteritems():
+ sys.modules['apiclient.%s' % module_name] = module
« no previous file with comments | « third_party/google_api_python_client/__init__.py ('k') | third_party/google_api_python_client/describe.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698