@@ -592,17 +592,20 @@ def detect_modules(self):
592592 if openssl_ver :
593593 break
594594
595- #print 'openssl_ver = 0x%08x' % openssl_ver
596-
597- if (ssl_incs is not None and
598- ssl_libs is not None and
599- openssl_ver >= 0x00907000 ):
600- # The _hashlib module wraps optimized implementations
601- # of hash functions from the OpenSSL library.
602- exts .append ( Extension ('_hashlib' , ['_hashopenssl.c' ],
603- include_dirs = ssl_incs ,
604- library_dirs = ssl_libs ,
605- libraries = ['ssl' , 'crypto' ]) )
595+ #print('openssl_ver = 0x%08x' % openssl_ver)
596+
597+ if ssl_incs is not None and ssl_libs is not None :
598+ if openssl_ver >= 0x00907000 :
599+ # The _hashlib module wraps optimized implementations
600+ # of hash functions from the OpenSSL library.
601+ exts .append ( Extension ('_hashlib' , ['_hashopenssl.c' ],
602+ include_dirs = ssl_incs ,
603+ library_dirs = ssl_libs ,
604+ libraries = ['ssl' , 'crypto' ]) )
605+ else :
606+ print ("warning: openssl 0x%08x is too old for _hashlib" %
607+ openssl_ver )
608+ missing .append ('_hashlib' )
606609 else :
607610 missing .append ('_hashlib' )
608611
0 commit comments