File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change 7
7
except ImportError :
8
8
from distutils .core import setup
9
9
10
+ # The Requests package added a release in 2.14.0 that broke a whole bunch of
11
+ # people on old versions of pip and setuptools (< 18.0.0). Here we check to see
12
+ # whether we have a version that might be affected so that we can add a maximum
13
+ # version for Requests.
14
+ #
15
+ # This can probably removed after most people have moved to setuptools 18.0.0+.
16
+ #
17
+ # More context here: https://github.com/stripe/stripe-python/pull/311
18
+ old_setuptools_version = False
19
+ try :
20
+ from distutils .version import StrictVersion
21
+ import setuptools
22
+ if StrictVersion (setuptools .__version__ ) < StrictVersion ("18.0.0" ):
23
+ old_setuptools_version = True
24
+ except ImportError :
25
+ pass
26
+
10
27
try :
11
28
from distutils .command .build_py import build_py_2to3 as build_py
12
29
except ImportError :
25
42
DeprecationWarning )
26
43
install_requires .append ('requests >= 0.8.8, < 0.10.1' )
27
44
install_requires .append ('ssl' )
45
+ elif old_setuptools_version :
46
+ install_requires .append ('requests >= 0.8.8, < 2.14.0' )
28
47
else :
29
48
install_requires .append ('requests >= 0.8.8' )
30
49
You can’t perform that action at this time.
0 commit comments