mirror of
https://github.com/apache/impala.git
synced 2025-12-19 18:12:08 -05:00
This adds the bin/check-python-syntax.sh script, which runs "python -m compileall" for all python files in Impala with both python2 and python3. This detects syntax errors in the python files. This will be incorporated into precommit once it is clean. This also adds future to the impala-python virtualenv. This provides the futurize script (exposed via impala-futurize), which can be used to automatically fix some py2/py3 issues. Future also provides the builtins library, which can provide python 3 functionality on python 2. Testing: - Ran impala-futurize locally - Ran the script repeatedly while fixing syntax errors Change-Id: Iae2c51bc6ddc9b6a04469ee1b8284227fed3bd45 Reviewed-on: http://gerrit.cloudera.org:8080/19550 Reviewed-by: Michael Smith <michael.smith@cloudera.com> Tested-by: Michael Smith <michael.smith@cloudera.com>
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.