diff --git a/tools/provision b/tools/provision index a9bdd4a..7d5f276 100755 --- a/tools/provision +++ b/tools/provision @@ -57,8 +57,11 @@ the Python version this command is executed with.""" # the venv's Python interpreter. `--prefix venv_dir` ensures that all modules are installed # in the right place. def install_dependencies(requirements_filename): - if subprocess.call([os.path.join(venv_dir, venv_exec_dir, 'pip'), - 'install', '--prefix', venv_dir, '-r', os.path.join(base_dir, requirements_filename)]): + pip_path = os.path.join(venv_dir, venv_exec_dir, 'pip') + # We first install a modern version of pip that supports --prefix + subprocess.call([pip_path, 'install', 'pip>=9.0']) + if subprocess.call([pip_path, 'install', '--prefix', venv_dir, '-r', + os.path.join(base_dir, requirements_filename)]): raise OSError("The command `pip install -r {}` failed. Dependencies not installed!" .format(os.path.join(base_dir, requirements_filename)))