python: refresh patches
[packages.git] / lang / python / patches / 120-force-internal-modules-for-hashlib.patch
1 ---
2  setup.py |   10 ++++++----
3  1 file changed, 6 insertions(+), 4 deletions(-)
4
5 --- Python-2.6.4.orig/setup.py
6 +++ Python-2.6.4/setup.py
7 @@ -622,9 +622,10 @@ class PyBuildExt(build_ext):
8  
9          #print 'openssl_ver = 0x%08x' % openssl_ver
10  
11 -        if (ssl_incs is not None and
12 -            ssl_libs is not None and
13 -            openssl_ver >= 0x00907000):
14 +#        if (ssl_incs is not None and
15 +#            ssl_libs is not None and
16 +#            openssl_ver >= 0x00907000):
17 +        if False:
18              # The _hashlib module wraps optimized implementations
19              # of hash functions from the OpenSSL library.
20              exts.append( Extension('_hashlib', ['_hashopenssl.c'],
21 @@ -644,7 +645,8 @@ class PyBuildExt(build_ext):
22                              depends = ['md5.h']) )
23              missing.append('_hashlib')
24  
25 -        if (openssl_ver < 0x00908000):
26 +#        if (openssl_ver < 0x00908000):
27 +        if True:
28              # OpenSSL doesn't do these until 0.9.8 so we'll bring our own hash
29              exts.append( Extension('_sha256', ['sha256module.c']) )
30              exts.append( Extension('_sha512', ['sha512module.c']) )