From 83c0648e98c44824883ce8707efc3d6f57358dc3 Mon Sep 17 00:00:00 2001 From: Donald Stufft <donald.stufft@gmail.com> Date: Sat, 23 Feb 2013 03:03:30 -0500 Subject: [PATCH] Add a single libnacl builder to smoke test it --- .travis.yml | 22 ++++++++++++++++++++++ tasks.py | 24 ++++++++++++++++++++---- 2 files changed, 42 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index fc2da169..198004ba 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 9c43f26b..047c80e4 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, -- GitLab