Commit 95ec0027 by pybind11_abseil authors Committed by Copybara-Service

Internal change

PiperOrigin-RevId: 419851159
parent 519fc543
...@@ -10,20 +10,23 @@ set -e # exit when any command fails ...@@ -10,20 +10,23 @@ set -e # exit when any command fails
MYDIR="$(dirname "$(realpath "$0")")" MYDIR="$(dirname "$(realpath "$0")")"
BAZEL=$(which bazel) BAZEL=$(which bazel || true)
if [[ -z $BAZEL || ! -x $BAZEL ]] if [[ -z $BAZEL || ! -x $BAZEL ]]
then then
echo -e -n '\e[1m\e[93m'
echo -n 'Bazel not found (bazel (https://bazel.build/) is needed to ' echo -n 'Bazel not found (bazel (https://bazel.build/) is needed to '
echo 'compile & test). Exiting...' echo -n 'compile & test). '
echo -e 'Exiting...\e[0m'
exit 1 exit 1
fi fi
VIRTUAL_ENV_BINARY=$(which virtualenv) VIRTUAL_ENV_BINARY=$(which virtualenv || true)
if [[ -z $VIRTUAL_ENV_BINARY || ! -x $VIRTUAL_ENV_BINARY ]] if [[ -z $VIRTUAL_ENV_BINARY || ! -x $VIRTUAL_ENV_BINARY ]]
then then
echo -e -n '\e[1m\e[93m'
echo -n 'virtualenv command not found ' echo -n 'virtualenv command not found '
echo -n '(try `python3 -m pip install virtualenv`, possibly as root). ' echo -n '(try `python3 -m pip install virtualenv`, possibly as root). '
echo 'Exiting...' echo -e 'Exiting...\e[0m'
exit 1 exit 1
fi fi
...@@ -36,11 +39,11 @@ then ...@@ -36,11 +39,11 @@ then
fi fi
echo -e "\e[33mRunning ${0} from $PWD\e[0m" echo -e "\e[33mRunning ${0} from $PWD\e[0m"
PYBIN=`which python3` PYBIN=$(which python3 || true)
if [ ! -x $PYBIN ] if [[ -z $PYBIN || ! -x $PYBIN ]]
then then
echo -e "\e[1m\e[93m$PYBIN not found! Skip build and test.\e[0m" echo -e '\e[1m\e[93mpython3 not found! Skip build and test.\e[0m'
continue exit 1
fi fi
PYVERSION=$($PYBIN -c 'import sys; print(".".join(map(str, sys.version_info[:3])))') PYVERSION=$($PYBIN -c 'import sys; print(".".join(map(str, sys.version_info[:3])))')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment