summaryrefslogtreecommitdiff
path: root/grpc/tools/run_tests/artifacts/build_package_python.sh
diff options
context:
space:
mode:
Diffstat (limited to 'grpc/tools/run_tests/artifacts/build_package_python.sh')
-rwxr-xr-xgrpc/tools/run_tests/artifacts/build_package_python.sh8
1 files changed, 3 insertions, 5 deletions
diff --git a/grpc/tools/run_tests/artifacts/build_package_python.sh b/grpc/tools/run_tests/artifacts/build_package_python.sh
index 35c78e9a..623eae7a 100755
--- a/grpc/tools/run_tests/artifacts/build_package_python.sh
+++ b/grpc/tools/run_tests/artifacts/build_package_python.sh
@@ -23,21 +23,19 @@ mkdir -p artifacts/
# and we only collect them here to deliver them to the distribtest phase.
cp -r "${EXTERNAL_GIT_ROOT}"/input_artifacts/python_*/* artifacts/ || true
-apt-get install -y python-pip
-python -m pip install -U pip
-python -m pip install -U wheel
+export PYTHON=${PYTHON:-python}
strip_binary_wheel() {
WHEEL_PATH="$1"
TEMP_WHEEL_DIR=$(mktemp -d)
- python -m wheel unpack "$WHEEL_PATH" -d "$TEMP_WHEEL_DIR"
+ ${PYTHON} -m wheel unpack "$WHEEL_PATH" -d "$TEMP_WHEEL_DIR"
find "$TEMP_WHEEL_DIR" -name "_protoc_compiler*.so" -exec strip --strip-debug {} ";"
find "$TEMP_WHEEL_DIR" -name "cygrpc*.so" -exec strip --strip-debug {} ";"
WHEEL_FILE=$(basename "$WHEEL_PATH")
DISTRIBUTION_NAME=$(basename "$WHEEL_PATH" | cut -d '-' -f 1)
VERSION=$(basename "$WHEEL_PATH" | cut -d '-' -f 2)
- python -m wheel pack "$TEMP_WHEEL_DIR/$DISTRIBUTION_NAME-$VERSION" -d "$TEMP_WHEEL_DIR"
+ ${PYTHON} -m wheel pack "$TEMP_WHEEL_DIR/$DISTRIBUTION_NAME-$VERSION" -d "$TEMP_WHEEL_DIR"
mv "$TEMP_WHEEL_DIR/$WHEEL_FILE" "$WHEEL_PATH"
}