port pyopenssl fix from urllib3

This commit is contained in:
Nate Prewitt
2018-06-10 14:45:14 -07:00
parent bc46de58e6
commit de64f0f23f
+7 -1
View File
@@ -40,6 +40,12 @@ if sys.argv[-1] == 'publish':
os.system('twine upload dist/*')
sys.exit()
# pyOpenSSL version 18.0.0 dropped support for Python 2.6
if sys.version_info < (2, 7):
PYOPENSSL_VERSION = 'pyOpenSSL >= 0.14, < 18.0.0'
else:
PYOPENSSL_VERSION = 'pyOpenSSL >= 0.14'
packages = ['requests']
requires = [
@@ -96,7 +102,7 @@ setup(
cmdclass={'test': PyTest},
tests_require=test_requirements,
extras_require={
'security': ['pyOpenSSL>=0.14', 'cryptography>=1.3.4', 'idna>=2.0.0'],
'security': [PYOPENSSL_VERSION, 'cryptography>=1.3.4', 'idna>=2.0.0'],
'socks': ['PySocks>=1.5.6, !=1.5.7'],
'socks:sys_platform == "win32" and (python_version == "2.7" or python_version == "2.6")': ['win_inet_pton'],
},