From: Zooko O'Whielacronx Date: Tue, 30 Jun 2009 18:48:07 +0000 (-0700) Subject: setup: require pycryptopp>=0.5.14 if on Windows and with Python>=2.6 X-Git-Tag: trac-4000~49 X-Git-Url: https://git.rkrishnan.org/vdrive/components/status?a=commitdiff_plain;h=a1c6ee17c3401861c3ab5dcd8f4c27cad7c23c05;p=tahoe-lafs%2Ftahoe-lafs.git setup: require pycryptopp>=0.5.14 if on Windows and with Python>=2.6 --- diff --git a/_auto_deps.py b/_auto_deps.py index 00b0edc1..a2711b55 100644 --- a/_auto_deps.py +++ b/_auto_deps.py @@ -3,11 +3,6 @@ install_requires=[ # zetuptoolz) to build, but can handle older versions to run "setuptools >= 0.6c6", - # pycryptopp < 0.5 had a bug which, using a Microsoft - # compiler, or using some versions of g++ while linking - # against certain older versions of Crypto++, would cause - # incorrect AES results. - "pycryptopp >= 0.5", "zfec >= 1.1.0", # Feisty has simplejson 1.4 @@ -19,9 +14,24 @@ install_requires=[ "Nevow >= 0.6.0", ] +import platform, sys +if sys.version_info >= (2, 6) and (platform.system() == "Windows"): + # pycryptopp v0.5.14 patched the embedded Crypto++ to remove the usages of + # time functions, thus allowing mingw to build and link it for Python 2.6. + # If I knew a convenient, reliable way to test whether the compiler that + # builds pycryptopp will be mingw then I guess I would add that, along with + # the Python >= v2.6 and the platform == Windows. This is to work-around + # http://sourceforge.net/tracker/?func=detail&aid=2805976&group_id=2435&atid=302435 + # . + install_requires.append( "pycryptopp >= 0.5.14") +else: + # pycryptopp < 0.5 had a bug which, using a Microsoft compiler, or using + # some versions of g++ while linking against certain older versions of + # Crypto++, would cause incorrect AES results. + 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 if sys.version_info < (2, 5): # pysqlite v2.0.5 was shipped in Ubuntu 6.06 LTS "dapper" and Nexenta NCP 1. install_requires.append("pysqlite >= 2.0.5")