From c2988b49d1299ab670a351c40cc7afe94f16c52e Mon Sep 17 00:00:00 2001 From: Donald Stufft <donald@stufft.io> Date: Tue, 24 Sep 2013 21:36:06 -0400 Subject: [PATCH] Remove the nacl.invoke package --- nacl/invoke/__init__.py | 0 nacl/invoke/sodium.py | 53 ----------------------------------------- setup.py | 1 - 3 files changed, 54 deletions(-) delete mode 100644 nacl/invoke/__init__.py delete mode 100644 nacl/invoke/sodium.py diff --git a/nacl/invoke/__init__.py b/nacl/invoke/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/nacl/invoke/sodium.py b/nacl/invoke/sodium.py deleted file mode 100644 index 59b2be72..00000000 --- a/nacl/invoke/sodium.py +++ /dev/null @@ -1,53 +0,0 @@ -import binascii -import hashlib -import os - -try: - from urllib.request import urlopen -except ImportError: - from urllib2 import urlopen - -from invoke import task, run - -LIBSODIUM_VERSION = "0.3" -LIBSODIUM_URL = "http://download.dnscrypt.org/libsodium/releases/libsodium-0.3.tar.gz" -LIBSODIUM_HASH = b"908a26f84bedb432305c81ec6773aa95b8e724ba2ece6234840685a74e033750" - - -@task -def install(): - path = os.path.expanduser("~/libsodium-%s.tar.gz" % LIBSODIUM_VERSION) - - # Download libsodium and verify it's hash - resp = urlopen(LIBSODIUM_URL) - content = resp.read() - - # Cannot use .hexdigest() here because Python 3 is stupid and returns - # a unciode string when you ask it for a hex encoded digest. - content_hash = binascii.hexlify(hashlib.sha256(content).digest()) - - # Verify our content matches the expected hash - if content_hash != LIBSODIUM_HASH: - raise ValueError("Hash mismatch for downloaded sodium") - - # Write out the tarball - with open(path, "wb") as fp: - fp.write(content) - - curdir = os.getcwd() - try: - os.chdir(os.path.expanduser("~/")) - - # Unpack the tarball - run("tar xf libsodium-%s.tar.gz" % LIBSODIUM_VERSION) - - # Configure and install the library - os.chdir(os.path.expanduser("~/libsodium-%s/" % LIBSODIUM_VERSION)) - - run("./configure --disable-debug --disable-dependency-tracking", - hide="out", - ) - run("make", hide="out") - run("sudo make install", hide="out") - finally: - os.chdir(curdir) diff --git a/setup.py b/setup.py index aadf8a71..be56e0e4 100644 --- a/setup.py +++ b/setup.py @@ -190,7 +190,6 @@ setup( packages=[ "nacl", - "nacl.invoke", ], ext_package="nacl", -- GitLab