From: Zooko O'Whielacronx Date: Tue, 21 Sep 2010 14:03:44 +0000 (-0700) Subject: setup: allow an older version of pycryptopp if we are not on x86 or amd64 architectur... X-Git-Tag: allmydata-tahoe-1.8.0~6 X-Git-Url: https://git.rkrishnan.org/simplejson/%22news.html/%22file:/frontends/CLI.txt?a=commitdiff_plain;h=cb8ab03ede58576aeb4219c52d8bc39876b22dfb;p=tahoe-lafs%2Ftahoe-lafs.git 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) --- 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