Files
impala/infra/python
Joe McDonnell ede22a63a5 IMPALA-10608 followup: Detect the virtualenv tarball version
When rebasing from an older commit, the version change
in virtualenv can cause there to be multiple virtualenv
tarballs of different versions in the infra/python/deps
directory. bootstrap_virtualenv.py currently doesn't
handle this gracefully, because it is looking for all
virtualenv*.tar.gz files and fails when it finds more
than one.

This changes bootstrap_virtualenv.py to get the virtualenv
version from the requirements.txt file and only look
for the tarball with that version. If it fails to get
the version, it falls back to the old method.

Testing:
 - Copied virtualenv-16.7.10.tar.gz to virtualenv-16.7.9.tar.gz
   and verified that bootstrap_virtualenv.py works

Change-Id: Iebfa9ba5e223d5187414e02e24f34562418fae40
Reviewed-on: http://gerrit.cloudera.org:8080/17249
Reviewed-by: Joe McDonnell <joemcdonnell@cloudera.com>
Tested-by: Joe McDonnell <joemcdonnell@cloudera.com>
2021-03-31 22:33:43 +00:00
..

To install new packages:

1) Add your package to deps/requirements.txt, or deps/compiled-requirements.txt if the
   the package needs a C/C++ compiler to build . You should specify the version number
   using the "foo == x.y.z" notation so future upgrades can be done automatically.
2) Run deps/download_requirements, it will download the package to the deps dir.
3) Run the "impala-python" command, this should detect that requirements.txt changed and
   automatically rebuild the virtualenv.
4) Now in the python prompt, you should be able to import the new module.

To upgrade a package:

1) Edit deps/requirement.txt to use the version you need.
2) Go to step 2 above.