From aa5f2fee637c42bae5146c32aa78bc00f4d3a598 Mon Sep 17 00:00:00 2001 From: Miro HronĨok Date: Jul 20 2018 10:26:14 +0000 Subject: Make virtuelenv testable --- 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