so we don't need to use virtualenv python package for creating a
virtualenv, the "venv" module in Python3 would suffice.
see also https://docs.python.org/3/library/venv.html
Signed-off-by: Kefu Chai <kchai@redhat.com>
test $? != 0 && usage
eval set -- "$TEMP"
-PYTHON_OPTION=""
+PYTHON=python3
while true ; do
case "$1" in
-h|--help) usage ;; # does not return
- --python) PYTHON_OPTION="--python=$2" ; shift ; shift ;;
+ --python) PYTHON="$2" ; shift ; shift ;;
--) shift ; break ;;
*) echo "Internal error" ; exit 1 ;;
esac
fi
rm -fr $DIR
mkdir -p $DIR
-virtualenv $PYTHON_OPTION $DIR
+$PYTHON -m venv $DIR
. $DIR/bin/activate
if pip --help | grep -q disable-pip-version-check; then