We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0c18afc commit f6b454cCopy full SHA for f6b454c
1 file changed
setup.py
@@ -27,6 +27,30 @@
27
sys.exit(1)
28
29
from setuptools import setup
30
+import pkg_resources
31
+
32
+def _DetectBadness():
33
+ import os
34
+ if 'SKIP_GOOGLEAPICLIENT_COMPAT_CHECK' in os.environ:
35
+ return
36
+ o2c_pkg = None
37
+ try:
38
+ o2c_pkg = pkg_resources.get_distribution('oauth2client')
39
+ except pkg_resources.DistributionNotFound:
40
+ pass
41
+ oauth2client = None
42
43
+ import oauth2client
44
+ except ImportError:
45
46
+ if o2c_pkg is None and oauth2client is not None:
47
+ raise RuntimeError(
48
+ 'Previous version of google-api-python-client detected; due to a '
49
+ 'packaging issue, we cannot perform an in-place upgrade. Please remove '
50
+ 'the old version and re-install this package.'
51
+ )
52
53
+_DetectBadness()
54
55
packages = [
56
'apiclient',
0 commit comments