mirror of
https://github.com/apache/impala.git
synced 2025-12-30 21:02:41 -05:00
This adds a bootstrap script and a "impala-python" command to $IMPALA_HOME/bin that automatically runs the bootstrap and redirects to the virtualenv python. Existing python scripts will later be updated to use the this new "impala-python" command. The bootstrap script will build a virtualenv to ensure a minimum python version (2.6) and a well known set of dependencies. The bootstrap script can be run with python 2.4 but 2.6 must already be installed on the system. The resulting virtualenv will use 2.6 at a minimum. Only dependencies explicitly listed in requirements.txt will be installed and available (no system packages will ever be used). No packages will ever be downloaded when setting up the virtualenv. In the future new dependencies can be added by editing the requirements.txt file. Installation through requirements.txt is a standard pip feature. When requirements.txt is updated, the next run of "impala-python" will rebuild the virtualenv. Change-Id: I150595d7e09a45d5f2e3c30a845bc8d6a761eeed Reviewed-on: http://gerrit.cloudera.org:8080/424 Reviewed-by: Casey Ching <casey@cloudera.com> Tested-by: Internal Jenkins
14 lines
583 B
Plaintext
14 lines
583 B
Plaintext
To install new packages:
|
|
|
|
1) Add your package to deps/requirements.txt. 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.
|