"""Retain apiclient as an alias for googleapiclient."""

import googleapiclient

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__

"""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__

Add another check for a failed googleapiclient upgrade.
Add another check for a failed googleapiclient upgrade.

This adds one more check for a failed 1.2 -> 1.3 upgrade, specifically in the
`apiclient` import (which was the only import available in 1.2). Even combined
with the check in setup.py, this won't catch everything, but it now covers all
the most common cases.

  """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__
  
Add another check for a failed googleapiclient upgrade.
## Code Before:
"""Retain apiclient as an alias for googleapiclient."""

import googleapiclient

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__

## Instruction:
Add another check for a failed googleapiclient upgrade.
## Code After:
"""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__
