From 7b6b15754754b45552d0872d36f3f30f5fa1a783 Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Fri, 18 Sep 2015 15:35:02 +0200 Subject: properly handle SNI IPs fixes mitmproxy/mitmproxy#772 We must use the ipaddress package here, because that's what cryptography uses. If we opt for something else, we have nasty namespace conflicts. --- setup.py | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) (limited to 'setup.py') diff --git a/setup.py b/setup.py index d3c09ceb..0c9fb07b 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,7 @@ from setuptools import setup, find_packages from codecs import open import os +import sys from netlib import version @@ -13,6 +14,18 @@ here = os.path.abspath(os.path.dirname(__file__)) with open(os.path.join(here, 'README.mkd'), encoding='utf-8') as f: long_description = f.read() +deps = { + "pyasn1>=0.1.7", + "pyOpenSSL>=0.15.1", + "cryptography>=1.0", + "passlib>=1.6.2", + "hpack>=1.0.1", + "six>=1.9.0", + "certifi>=2015.9.6.2", +} +if sys.version_info < (3, 0): + deps.add("ipaddress>=1.0.14") + setup( name="netlib", version=version.VERSION, @@ -40,15 +53,7 @@ setup( packages=find_packages(), include_package_data=True, zip_safe=False, - install_requires=[ - "pyasn1>=0.1.7", - "pyOpenSSL>=0.15.1", - "cryptography>=1.0", - "passlib>=1.6.2", - "hpack>=1.0.1", - "six>=1.9.0", - "certifi" - ], + install_requires=list(deps), extras_require={ 'dev': [ "mock>=1.0.1", -- cgit v1.2.3