IMPALA-6752: fix pip --no-binary usage The key facts here are: * --no-cache-dir is crucial because it prevents us pulling in a cached package compiled with the wrong compiler. * --no-binary takes a argument specifying the set of packages it should apply to.
The latent bug was that we didn't provide an argument to --no-binary and it instead it took --no-index as the argument, which was a no-op because there are no packages of that name. IMPALA-6731 moved the arguments, and instead --no-cache-dir became the argument to --no-binary Testing: I could reliably reproduce the failure in my environment by deleting infra/python/env then running a test with impala-py.test. This patch is sufficient to solve it. Change-Id: I118738347ca537b2dddfa6142c3eb5608c49c2e0 Reviewed-on: http://gerrit.cloudera.org:8080/9829 Reviewed-by: Tim Armstrong <[email protected]> Tested-by: Impala Public Jenkins Project: http://git-wip-us.apache.org/repos/asf/impala/repo Commit: http://git-wip-us.apache.org/repos/asf/impala/commit/f46c695a Tree: http://git-wip-us.apache.org/repos/asf/impala/tree/f46c695a Diff: http://git-wip-us.apache.org/repos/asf/impala/diff/f46c695a Branch: refs/heads/2.x Commit: f46c695a937eb61e16eaa2e8df5d9ec8536f3abd Parents: 720a654 Author: Tim Armstrong <[email protected]> Authored: Tue Mar 27 15:49:20 2018 -0700 Committer: Impala Public Jenkins <[email protected]> Committed: Wed Mar 28 07:40:00 2018 +0000 ---------------------------------------------------------------------- infra/python/bootstrap_virtualenv.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/impala/blob/f46c695a/infra/python/bootstrap_virtualenv.py ---------------------------------------------------------------------- diff --git a/infra/python/bootstrap_virtualenv.py b/infra/python/bootstrap_virtualenv.py index fe7695d..1953935 100644 --- a/infra/python/bootstrap_virtualenv.py +++ b/infra/python/bootstrap_virtualenv.py @@ -147,7 +147,7 @@ def exec_pip_install(args, cc="no-cc-available", env=None): # --no-cache-dir is used to prevent caching of compiled artifacts, which may be built # with different compilers or settings. cmd = [os.path.join(ENV_DIR, "bin", "python"), os.path.join(ENV_DIR, "bin", "pip"), - "install", "-v", "--no-binary", "--no-cache-dir"] + "install", "-v", "--no-binary", ":all:", "--no-cache-dir"] # When using a custom mirror, we also must use the index of that mirror. if "PYPI_MIRROR" in os.environ:
