--- Python-2.7.2/setup.py.orig 2011-06-11 17:46:28.000000000 +0200 +++ Python-2.7.2/setup.py 2018-12-23 15:53:22.521709336 +0100 @@ -706,18 +706,15 @@ class PyBuildExt(build_ext): '/usr/local/ssl/include', '/usr/contrib/ssl/include/' ] - ssl_incs = find_file('openssl/ssl.h', inc_dirs, - search_for_ssl_incs_in - ) + ssl_incs = [ + os.path.join(os.environ["OPENSSL_BUILD"], 'include'), + os.path.join(os.environ["OPENSSL_BUILD"], 'include', 'openssl')] if ssl_incs is not None: krb5_h = find_file('krb5.h', inc_dirs, ['/usr/kerberos/include']) if krb5_h: ssl_incs += krb5_h - ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs, - ['/usr/local/ssl/lib', - '/usr/contrib/ssl/lib/' - ] ) + ssl_libs = [os.environ["OPENSSL_BUILD"]] if (ssl_incs is not None and ssl_libs is not None): @@ -735,8 +732,8 @@ class PyBuildExt(build_ext): '^\s*#\s*define\s+OPENSSL_VERSION_NUMBER\s+(0x[0-9a-fA-F]+)' ) # look for the openssl version header on the compiler search path. - opensslv_h = find_file('openssl/opensslv.h', [], - inc_dirs + search_for_ssl_incs_in) + opensslv_h = [os.path.join(os.environ["OPENSSL_BUILD"], 'include'), + os.path.join(os.environ["OPENSSL_BUILD"], 'include', 'openssl')] if opensslv_h: name = os.path.join(opensslv_h[0], 'openssl/opensslv.h') if sys.platform == 'darwin' and is_macosx_sdk_path(name): @@ -753,8 +750,7 @@ class PyBuildExt(build_ext): min_openssl_ver = 0x00907000 have_any_openssl = ssl_incs is not None and ssl_libs is not None - have_usable_openssl = (have_any_openssl and - openssl_ver >= min_openssl_ver) + have_usable_openssl = (have_any_openssl and True) if have_any_openssl: if have_usable_openssl: