mirror of
https://github.com/apache/impala.git
synced 2025-12-25 02:03:09 -05:00
Fix bin/set-pythonpath.sh for zsh
Change-Id: I706a42e48118bd16b769b571f7157543799018c5 Reviewed-on: http://gerrit.cloudera.org:8080/1587 Reviewed-by: Lars Volker <lv@cloudera.com> Tested-by: Internal Jenkins
This commit is contained in:
committed by
Internal Jenkins
parent
b02c349e25
commit
6f3e794058
@@ -255,10 +255,10 @@ export HBASE_CONF_DIR=$HIVE_CONF_DIR
|
||||
|
||||
# Optionally set the Thrift home to the toolchain
|
||||
if [[ -z $IMPALA_TOOLCHAIN ]]; then
|
||||
THRIFT_SRC_DIR=${IMPALA_HOME}/thirdparty/thrift-${IMPALA_THRIFT_VERSION}/
|
||||
export THRIFT_HOME=${THRIFT_SRC_DIR}build/
|
||||
THRIFT_SRC_DIR=${IMPALA_HOME}/thirdparty/thrift-${IMPALA_THRIFT_VERSION}
|
||||
export THRIFT_HOME=${THRIFT_SRC_DIR}/build
|
||||
else
|
||||
export THRIFT_HOME=${IMPALA_TOOLCHAIN}/thrift-${IMPALA_THRIFT_VERSION}/
|
||||
export THRIFT_HOME=${IMPALA_TOOLCHAIN}/thrift-${IMPALA_THRIFT_VERSION}
|
||||
fi
|
||||
|
||||
# ASAN needs a matching version of llvm-symbolizer to symbolize stack traces.
|
||||
|
||||
@@ -16,12 +16,17 @@
|
||||
PYTHONPATH=$IMPALA_HOME:$IMPALA_HOME/shell/gen-py:$IMPALA_HOME/testdata/
|
||||
|
||||
# There should be just a single version of python that created the
|
||||
# site-packages directory.
|
||||
# site-packages directory. We find it by performing shell independent expansion
|
||||
# of the following pattern:
|
||||
# ${THRIFT_HOME}/python/lib{64,}/python*/site-packages
|
||||
# Note: this could go wrong if we have used two different versions of
|
||||
# Python to build Thrift on this machine, and the first version is not
|
||||
# compatible with the second.
|
||||
for PYTHON_DIR in ${THRIFT_HOME}/python/lib{64,}/python*/site-packages; do
|
||||
PYTHONPATH=$PYTHONPATH:${PYTHON_DIR}/
|
||||
for PYTHON_DIR in ${THRIFT_HOME}/python/lib{64,}; do
|
||||
[[ -d $PYTHON_DIR ]] || continue
|
||||
for PKG_DIR in $PYTHON_DIR/python*/site-packages; do
|
||||
PYTHONPATH=$PYTHONPATH:${PKG_DIR}/
|
||||
done
|
||||
done
|
||||
|
||||
# Add Hive after Thrift because Hive supplies its own Thrift modules
|
||||
|
||||
@@ -92,11 +92,11 @@ done
|
||||
|
||||
# Copy all the shell files into the build dir
|
||||
# The location of python libs for thrift is different in rhel/centos/sles
|
||||
if [ -d ${THRIFT_HOME}python/lib/python*/site-packages/thrift ]; then
|
||||
cp -r ${THRIFT_HOME}python/lib/python*/site-packages/thrift\
|
||||
if [ -d ${THRIFT_HOME}/python/lib/python*/site-packages/thrift ]; then
|
||||
cp -r ${THRIFT_HOME}/python/lib/python*/site-packages/thrift\
|
||||
${TARBALL_ROOT}/lib
|
||||
else
|
||||
cp -r ${THRIFT_HOME}python/lib64/python*/site-packages/thrift\
|
||||
cp -r ${THRIFT_HOME}/python/lib64/python*/site-packages/thrift\
|
||||
${TARBALL_ROOT}/lib
|
||||
fi
|
||||
cp -r ${SHELL_HOME}/gen-py ${TARBALL_ROOT}
|
||||
|
||||
Reference in New Issue
Block a user