diff --git a/native_client/definitions.mk b/native_client/definitions.mk index 19a02703..2cd6e4fd 100644 --- a/native_client/definitions.mk +++ b/native_client/definitions.mk @@ -12,7 +12,7 @@ CXXFLAGS := LDFLAGS := SOX_CFLAGS := `pkg-config --cflags sox` SOX_LDFLAGS := `pkg-config --libs sox` -PYTHON_PACKAGES := numpy +PYTHON_PACKAGES := numpy==${NUMPY_VERSION} ifeq ($(OS),Linux) PYTHON_PLATFORM_NAME := --plat-name manylinux1_x86_64 endif diff --git a/native_client/setup.py b/native_client/setup.py index 54be1519..2054da8c 100755 --- a/native_client/setup.py +++ b/native_client/setup.py @@ -21,6 +21,7 @@ def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() numpy_include = os.getenv('NUMPY_INCLUDE', numpy_include) +numpy_min_ver = os.getenv('NUMPY_VERSION', '1.7.0') project_name = 'deepspeech' if '--project_name' in sys.argv: @@ -69,7 +70,7 @@ setup(name = project_name, }, ext_modules = [model, utils], entry_points={'console_scripts':['deepspeech = deepspeech.client:main']}, - install_requires = ['numpy'], + install_requires = ['numpy>=%s' % numpy_min_ver], include_package_data = True, classifiers = [ 'Development Status :: 3 - Alpha', diff --git a/tc-tests-utils.sh b/tc-tests-utils.sh index aae1669d..6a579f0d 100755 --- a/tc-tests-utils.sh +++ b/tc-tests-utils.sh @@ -528,6 +528,8 @@ maybe_ssl102_py37() export PY37_OPENSSL="--with-openssl=${PY37_OPENSSL_DIR}/usr" export PY37_LDPATH="${PY37_OPENSSL_DIR}/usr/lib/" fi; + + export NUMPY_VERSION="1.14.5" ;; esac } @@ -555,6 +557,8 @@ do_deepspeech_python_build() pyver=$(echo "${pyver_conf}" | cut -d':' -f1) pyconf=$(echo "${pyver_conf}" | cut -d':' -f2) + export NUMPY_VERSION="1.7.0" + maybe_ssl102_py37 ${pyver} LD_LIBRARY_PATH=${PY37_LDPATH}:$LD_LIBRARY_PATH PYTHON_CONFIGURE_OPTS="--enable-unicode=${pyconf} ${PY37_OPENSSL}" pyenv install ${pyver} @@ -578,6 +582,8 @@ do_deepspeech_python_build() make -C native_client/ bindings-clean + unset NUMPY_VERSION + deactivate pyenv uninstall --force deepspeech pyenv uninstall --force ${pyver}