Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit eb1cf4e

Browse files
committed
Print warning when openssl is too old; it's pretty essential at this point.
1 parent 19e6238 commit eb1cf4e

1 file changed

Lines changed: 14 additions & 11 deletions

File tree

setup.py

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)