diff --git a/.travis.yml b/.travis.yml index fc2da1697ed1b3d6bc11e7c2e9aadebb15bc86f5..198004ba4bd881c645a39cbac2f0f14cbb4aecad 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,3 +19,25 @@ env: matrix: - NACL=libsodium - NACL=nacl +matrix: + exclude: + - python: "2.6" + env: + - NACL=nacl + - LD_LIBRARY_PATH=/usr/local/lib + - LD_RUN_PATH=/usr/local/lib + - python: "3.2" + env: + - NACL=nacl + - LD_LIBRARY_PATH=/usr/local/lib + - LD_RUN_PATH=/usr/local/lib + - python: "3.3" + env: + - NACL=nacl + - LD_LIBRARY_PATH=/usr/local/lib + - LD_RUN_PATH=/usr/local/lib + - python: "pypy" + env: + - NACL=nacl + - LD_LIBRARY_PATH=/usr/local/lib + - LD_RUN_PATH=/usr/local/lib diff --git a/tasks.py b/tasks.py index 9c43f26bc41e0a90aadb883c6231bdc3d476d98e..047c80e4e5ea63cbe07603c92d2d8a140bf11b02 100644 --- a/tasks.py +++ b/tasks.py @@ -44,11 +44,27 @@ def install_nacl(library): os.chdir(curdir) def _install_nacl(): - # Determine if we are running under Ubuntu - if platform.linux_distribution()[0] == "Ubuntu": - run("sudo apt-get install libnacl-dev") + tarball_path = os.path.expanduser("~/nacl-20110221.tar.bz2") - raise NotImplementedError + # Download libnacl and verify it's hash + download( + "http://hyperelliptic.org/nacl/nacl-20110221.tar.bz2", + "4f277f89735c8b0b8a6bbd043b3efb3fa1cc68a9a5da6a076507d067fc3b3bf8", + tarball_path, + ) + + curdir = os.getcwd() + try: + os.chdir(os.path.expanduser("~/")) + + # Unpack the tarball + run("tar xf nacl-20110221.tar.bz2") + + # Configure and install the library + os.chdir(os.path.expanduser("~/nacl-20110221/")) + run("sudo ./do") + finally: + os.chdir(curdir) libraries = { "libsodium": _install_libsodium,