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 <tarmstrong@cloudera.com>
Tested-by: Impala Public Jenkins
This commit is contained in:
Tim Armstrong
2018-03-27 15:49:20 -07:00
committed by Impala Public Jenkins
parent 0812f8737a
commit bc3e4fb376

View File

@@ -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: