IMPALA-11955: (Addendum) Use impala-python for packaging

Uses impala-python when running packaging scripts to use a known python
version with setuptools available. This supports running on systems
where the `python` binary is available (as Python 2) but doesn't include
setuptools.

In this configuration IMPALA_SYSTEM_PYTHON2_OVERRIDE= is set to disable
building with python2, and only python3 is used for shell packaging.

Also ensures that we use IMPALA_SYSTEM_PYTHON2/3 when using system
python for building.

Testing:
- Manual build with python as a minimal Python 2 install, and Python 3.8
  (including setuptools).

Change-Id: I51c257010ef8fb1790482cdc3315aede908ef095
Reviewed-on: http://gerrit.cloudera.org:8080/19619
Reviewed-by: Joe McDonnell <joemcdonnell@cloudera.com>
Tested-by: Michael Smith <michael.smith@cloudera.com>
This commit is contained in:
Michael Smith
2023-03-14 15:52:46 -07:00
parent 7dbdcfb9af
commit c5aed4e78e
2 changed files with 5 additions and 5 deletions

View File

@@ -82,7 +82,7 @@ create_distributable_python_package() {
pushd "${PACKAGE_DIR}"
echo "Building package..."
PACKAGE_TYPE="${PACKAGE_TYPE:-}" OFFICIAL="${OFFICIAL:-}" \
python setup.py sdist --dist-dir "${DIST_DIR}"
impala-python setup.py sdist --dist-dir "${DIST_DIR}"
popd
if [[ "${NO_CLEAN_DIST}" != "true" ]]; then