From cb8ab03ede58576aeb4219c52d8bc39876b22dfb Mon Sep 17 00:00:00 2001 From: Zooko O'Whielacronx Date: Tue, 21 Sep 2010 07:03:44 -0700 Subject: [PATCH] setup: allow an older version of pycryptopp if we are not on x86 or amd64 architecture (which are the architectures on which older versions of Crypto++ had bugs in asm implementations of AES and SHA-256) --- _auto_deps.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/_auto_deps.py b/_auto_deps.py index 8e4809a2..619da5dc 100644 --- a/_auto_deps.py +++ b/_auto_deps.py @@ -17,10 +17,6 @@ install_requires=[ "foolscap[secure_connections] >= 0.5.1", "Nevow >= 0.6.0", - # pycryptopp v0.5.20 fixes bugs in SHA-256 and AES (from Crypto++ - # revisions 470, 471, 480, 492). - "pycryptopp >= 0.5.20", - # Needed for SFTP. pyasn1 is needed by twisted.conch in Twisted >= 9.0. # pycrypto 2.2 doesn't work due to https://bugs.launchpad.net/pycrypto/+bug/620253 "pycrypto == 2.0.1, == 2.1, >= 2.3", @@ -30,6 +26,17 @@ install_requires=[ #"windmill >= 1.3", ] +import platform +if platform.machine().lower() in ['i386', 'x86_64', 'amd64', '']: + # pycryptopp v0.5.20 fixes bugs in SHA-256 and AES on x86 or amd64 + # (from Crypto++ revisions 470, 471, 480, 492). The '' is there + # in case platform.machine is broken and this is actually an x86 + # or amd64 machine. + install_requires.append("pycryptopp >= 0.5.20") +else: + install_requires.append("pycryptopp >= 0.5") + + # Sqlite comes built into Python >= 2.5, and is provided by the "pysqlite" # distribution for Python 2.4. import sys -- 2.45.2