]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
setup: allow an older version of pycryptopp if we are not on x86 or amd64 architectur...
authorZooko O'Whielacronx <zooko@zooko.com>
Tue, 21 Sep 2010 14:03:44 +0000 (07:03 -0700)
committerZooko O'Whielacronx <zooko@zooko.com>
Tue, 21 Sep 2010 14:03:44 +0000 (07:03 -0700)
_auto_deps.py

index 8e4809a257e5a9c6e795f2b85f1b6409e559a253..619da5dc47acbcea2a2bca3f1eca5636235e71a0 100644 (file)
@@ -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