[Python-3000-checkins] r57151 - python/branches/py3k/setup.py

guido.van.rossum python-3000-checkins at python.org
Fri Aug 17 19:14:44 CEST 2007


Author: guido.van.rossum
Date: Fri Aug 17 19:14:17 2007
New Revision: 57151

Modified:
   python/branches/py3k/setup.py
Log:
Print warning when openssl is too old; it's pretty essential at this point.


Modified: python/branches/py3k/setup.py
==============================================================================
--- python/branches/py3k/setup.py	(original)
+++ python/branches/py3k/setup.py	Fri Aug 17 19:14:17 2007
@@ -592,17 +592,20 @@
             if openssl_ver:
                 break
 
-        #print 'openssl_ver = 0x%08x' % openssl_ver
+        #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']) )
+        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')
 


More information about the Python-3000-checkins mailing list