diff --git a/setup.py b/setup.py index 29d6ad6d..6a6b9383 100755 --- a/setup.py +++ b/setup.py @@ -1,33 +1,34 @@ #!/usr/bin/env python from distutils.core import setup, Extension - -pyethash = Extension('pyethash', - sources = [ - 'src/python/core.c', - 'src/libethash/util.c', - 'src/libethash/internal.c', - 'src/libethash/sha3.c'], - depends = [ - 'src/libethash/ethash.h', - 'src/libethash/compiler.h', - 'src/libethash/data_sizes.h', - 'src/libethash/endian.h', - 'src/libethash/ethash.h', - 'src/libethash/fnv.h', - 'src/libethash/internal.h', - 'src/libethash/sha3.h', - 'src/libethash/util.h' - ], - extra_compile_args = ["-Isrc/", "-std=gnu99", "-Wall"]) - -setup ( - name = 'pyethash', - author = "Matthew Wampler-Doty", - author_email = "matthew.wampler.doty@gmail.com", - license = 'GPL', - version = '23', - url = 'https://github.com/ethereum/ethash', - download_url = 'https://github.com/ethereum/ethash/tarball/v23', - description = 'Python wrappers for ethash, the ethereum proof of work hashing function', - ext_modules = [pyethash], - ) + +pyethash = Extension('pyethash', + sources=[ + 'src/python/core.c', + 'src/libethash/util.c', + 'src/libethash/internal.c', + 'src/libethash/sha3.c'], + depends=[ + 'src/libethash/ethash.h', + 'src/libethash/compiler.h', + 'src/libethash/data_sizes.h', + 'src/libethash/endian.h', + 'src/libethash/ethash.h', + 'src/libethash/fnv.h', + 'src/libethash/internal.h', + 'src/libethash/sha3.h', + 'src/libethash/util.h' + ], + extra_compile_args=["-Isrc/", "-std=gnu99", "-Wall"]) + +setup( + name='pyethash', + author="Matthew Wampler-Doty", + author_email="matthew.wampler.doty@gmail.com", + license='GPL', + version='0.1.23', + url='https://github.com/ethereum/ethash', + download_url='https://github.com/ethereum/ethash/tarball/v23', + description=('Python wrappers for ethash, the ethereum proof of work' + 'hashing function'), + ext_modules=[pyethash], +) diff --git a/src/python/core.c b/src/python/core.c index d0d3aa94..9024bd58 100644 --- a/src/python/core.c +++ b/src/python/core.c @@ -110,7 +110,7 @@ calc_dataset_bytes(PyObject *self, PyObject *args) { free(mem); return val; } -#define DEB(...) printf(__VA_ARGS__); fflush(stdout); + // hashimoto_light(full_size, cache, header, nonce) static PyObject * hashimoto_light(PyObject *self, PyObject *args) { diff --git a/test/python/test.sh b/test/python/test.sh index 4703839b..05c66b55 100755 --- a/test/python/test.sh +++ b/test/python/test.sh @@ -3,11 +3,13 @@ # Strict mode set -e -# just a specific case for archlinux where python3 is the default -if [ -f "/etc/arch-release" ]; then - VIRTUALENV_EXEC=virtualenv2 +if [ -x "$(which virtualenv2)" ] ; then + VIRTUALENV_EXEC=virtualenv2 +elif [ -x "$(which virtualenv)" ] ; then + VIRTUALENV_EXEC=virtualenv else - VIRTUALENV_EXEC=virtualenv + echo "Could not find a suitable version of virtualenv" + false fi SOURCE="${BASH_SOURCE[0]}"