OLD | NEW |
(Empty) | |
| 1 """Retain apiclient as an alias for googleapiclient.""" |
| 2 |
| 3 import googleapiclient |
| 4 |
| 5 try: |
| 6 import oauth2client |
| 7 except ImportError: |
| 8 raise RuntimeError( |
| 9 'Previous version of google-api-python-client detected; due to a ' |
| 10 'packaging issue, we cannot perform an in-place upgrade. To repair, ' |
| 11 'remove and reinstall this package, along with oauth2client and ' |
| 12 'uritemplate. One can do this with pip via\n' |
| 13 ' pip install -I google-api-python-client' |
| 14 ) |
| 15 |
| 16 from googleapiclient import channel |
| 17 from googleapiclient import discovery |
| 18 from googleapiclient import errors |
| 19 from googleapiclient import http |
| 20 from googleapiclient import mimeparse |
| 21 from googleapiclient import model |
| 22 from googleapiclient import sample_tools |
| 23 from googleapiclient import schema |
| 24 |
| 25 __version__ = googleapiclient.__version__ |
| 26 |
| 27 _SUBMODULES = { |
| 28 'channel': channel, |
| 29 'discovery': discovery, |
| 30 'errors': errors, |
| 31 'http': http, |
| 32 'mimeparse': mimeparse, |
| 33 'model': model, |
| 34 'sample_tools': sample_tools, |
| 35 'schema': schema, |
| 36 } |
| 37 |
| 38 import sys |
| 39 for module_name, module in _SUBMODULES.iteritems(): |
| 40 sys.modules['apiclient.%s' % module_name] = module |
OLD | NEW |