]> granicus.if.org Git - python/commitdiff
Print warning when openssl is too old; it's pretty essential at this point.
authorGuido van Rossum <guido@python.org>
Fri, 17 Aug 2007 17:14:17 +0000 (17:14 +0000)
committerGuido van Rossum <guido@python.org>
Fri, 17 Aug 2007 17:14:17 +0000 (17:14 +0000)
setup.py

index e1cb765fd014086de729c60e7a115c768548f11e..3d527fd8ab8375ef0795e72ac64892a0b5361f10 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -592,17 +592,20 @@ class PyBuildExt(build_ext):
             if openssl_ver:
                 break
 
-        #print 'openssl_ver = 0x%08x' % openssl_ver
-
-        if (ssl_incs is not None and
-            ssl_libs is not None and
-            openssl_ver >= 0x00907000):
-            # The _hashlib module wraps optimized implementations
-            # of hash functions from the OpenSSL library.
-            exts.append( Extension('_hashlib', ['_hashopenssl.c'],
-                                   include_dirs = ssl_incs,
-                                   library_dirs = ssl_libs,
-                                   libraries = ['ssl', 'crypto']) )
+        #print('openssl_ver = 0x%08x' % openssl_ver)
+
+        if ssl_incs is not None and ssl_libs is not None:
+            if openssl_ver >= 0x00907000:
+                # The _hashlib module wraps optimized implementations
+                # of hash functions from the OpenSSL library.
+                exts.append( Extension('_hashlib', ['_hashopenssl.c'],
+                                       include_dirs = ssl_incs,
+                                       library_dirs = ssl_libs,
+                                       libraries = ['ssl', 'crypto']) )
+            else:
+                print("warning: openssl 0x%08x is too old for _hashlib" %
+                      openssl_ver)
+                missing.append('_hashlib')
         else:
             missing.append('_hashlib')