Don't force the install of a specific numpy version unless explicitly requested to when running build.py. Validate that just the minimum version required is available. (#1031)

This commit is contained in:
Scott McKay 2019-05-16 02:38:18 +10:00 committed by GitHub
parent a63598ac5d
commit 3ac4826268
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -84,7 +84,7 @@ Use the individual flags to only run the specified stages.
# Python bindings
parser.add_argument("--enable_pybind", action='store_true', help="Enable Python Bindings.")
parser.add_argument("--build_wheel", action='store_true', help="Build Python Wheel. ")
parser.add_argument("--numpy_version", default='1.15.0', help="Installs a specific version of numpy "
parser.add_argument("--numpy_version", help="Installs a specific version of numpy "
"before building the python binding.")
parser.add_argument("--skip-keras-test", action='store_true', help="Skip tests with Keras if keras is installed")
@ -219,7 +219,7 @@ def install_ubuntu_deps(args):
def install_python_deps(numpy_version=""):
dep_packages = ['setuptools', 'wheel']
dep_packages.append('numpy==%s' % numpy_version if numpy_version else 'numpy')
dep_packages.append('numpy=={}'.format(numpy_version) if numpy_version else 'numpy>=1.15.0')
run_subprocess([sys.executable, '-m', 'pip', 'install', '--trusted-host', 'files.pythonhosted.org'] + dep_packages)
def check_md5(filename, expected_md5):