Issue #16113: integrade SHA-3 (Keccak) patch from http://hg.python.org/sandbox/cheimes

This commit is contained in:
Christian Heimes 2012-10-06 02:23:36 +02:00
parent 8c6db45d3e
commit 4a0270d82b
30 changed files with 7971 additions and 28 deletions

View file

@ -838,6 +838,15 @@ class PyBuildExt(build_ext):
exts.append( Extension('_sha1', ['sha1module.c'],
depends=['hashlib.h']) )
# SHA-3 (Keccak) module
sha3_depends = ['hashlib.h']
keccak = os.path.join(os.getcwd(), srcdir, 'Modules', '_sha3',
'keccak')
for pattern in ('*.c', '*.h', '*.macros'):
sha3_depends.extend(glob(os.path.join(keccak, pattern)))
exts.append(Extension("_sha3", ["_sha3/sha3module.c"],
depends=sha3_depends))
# Modules that provide persistent dictionary-like semantics. You will
# probably want to arrange for at least one of them to be available on
# your machine, though none are defined by default because of library