diff --git a/nacl/invoke/__init__.py b/nacl/invoke/__init__.py deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/nacl/invoke/sodium.py b/nacl/invoke/sodium.py deleted file mode 100644 index 59b2be720e96d413d789655546903a71e6c9cf2f..0000000000000000000000000000000000000000 --- 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 aadf8a71e0b1ce5c38032ffe2e3ff41d5c41f915..be56e0e47989f2141226607e38a615d235fe1f9f 100644 --- a/setup.py +++ b/setup.py @@ -190,7 +190,6 @@ setup( packages=[ "nacl", - "nacl.invoke", ], ext_package="nacl",