diff --git a/smoke/venv.sh b/smoke/venv.sh index df58d21..f407a87 100755 --- a/smoke/venv.sh +++ b/smoke/venv.sh @@ -3,12 +3,21 @@ # set python version VERSION=${VERSION:-3.7} PYTHON=python$VERSION +METHOD=${METHOD:-venv} # clean from possible older runs rm -rf venv .tox __pycache__ .pytest* test_*.py *.pyx *.c *.so || : # check the we can create the venv -$PYTHON -m venv venv +if [ "$METHOD" == "venv" ]; then + $PYTHON -m venv venv +elif [ "$METHOD" == "virtualenv" ]; then + virtualenv --python=$PYTHON venv +else + echo 'Unsupported $METHOD' $METHOD >&2 +exit 1 +fi + # and activate it # unset variables on 3.5, it's known