@@ -43,32 +43,6 @@ def run_tests(self):
43
43
os .system ('python setup.py sdist upload' )
44
44
sys .exit ()
45
45
46
- py_version = sys .version_info [:2 ]
47
- py_long_version = sys .version_info [:3 ]
48
-
49
- try :
50
- pypy_version = sys .pypy_version_info [:2 ]
51
- except AttributeError :
52
- pypy_version = None
53
-
54
-
55
- def resolve_install_requires ():
56
- basic_dependencies = ['h2>=2.3,<3.0' , 'hyperframe>=3.2,<4.0' ]
57
-
58
- if py_version == (3 , 3 ):
59
- basic_dependencies .extend (
60
- ['pyOpenSSL>=0.15' , 'service_identity>=14.0.0' ]
61
- )
62
- elif py_version == (2 , 7 ) and py_long_version < (2 , 7 , 9 ):
63
- basic_dependencies .extend (
64
- ['pyOpenSSL>=0.15' , 'service_identity>=14.0.0' ]
65
- )
66
-
67
- # PyPy earlier than 2.6.0 doesn't support cryptography 1.0
68
- if pypy_version and pypy_version < (2 , 6 ):
69
- basic_dependencies .append ('cryptography<1.0' )
70
-
71
- return basic_dependencies
72
46
73
47
packages = [
74
48
'hyper' ,
@@ -104,7 +78,7 @@ def resolve_install_requires():
104
78
'Programming Language :: Python :: 3.5' ,
105
79
'Programming Language :: Python :: Implementation :: CPython' ,
106
80
],
107
- install_requires = resolve_install_requires () ,
81
+ install_requires = [ 'h2>=2.3,<3.0' , 'hyperframe>=3.2,<4.0' ] ,
108
82
tests_require = ['pytest' , 'requests' , 'mock' ],
109
83
cmdclass = {'test' : PyTest },
110
84
entry_points = {
@@ -114,5 +88,14 @@ def resolve_install_requires():
114
88
},
115
89
extras_require = {
116
90
'fast' : ['pycohttpparser' ],
91
+ # Fallback to good SSL on bad Python versions.
92
+ ':python_full_version < "2.7.9" or python_version == "3.3"' : [
93
+ 'pyOpenSSL>=0.15' , 'service_identity>=14.0.0'
94
+ ],
95
+ # PyPy with bad SSL modules will likely also need the cryptography
96
+ # module at lower than 1.0, because it doesn't support CFFI v1.0 yet.
97
+ ':platform_python_implementation == "PyPy" and python_full_version < "2.7.9"' : [
98
+ 'cryptography<1.0'
99
+ ]
117
100
}
118
101
)
0 commit comments