Skip to content

Commit 8672841

Browse files
delsimMark Gibbs
andauthored
Upgrade make_env script to stop on error and also to allow selection of python version (#340)
Co-authored-by: Mark Gibbs <mark@gibbs.consulting>
1 parent 3e27964 commit 8672841

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

make_env

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
11
#!/usr/bin/env bash
22
#
3-
# Create a virtualenv. Note that python 3.6 is the minimal requirement
3+
# Create a virtualenv. Note that python 3.6 is currently the minimal requirement
44
#
5-
virtualenv -p python3.6 env
5+
# Stop on error, rather than continue and trash the environment
6+
set -e
7+
#
8+
# Default to 3.6 but allow override
9+
DEFAULT_PYTHON_VER=3.6
10+
PYTHON_VER=${1:-$DEFAULT_PYTHON_VER}
11+
#
12+
virtualenv -p python${PYTHON_VER} env
613
#
714
source env/bin/activate
815
#

0 commit comments

Comments
 (0)