Skip to content

Commit

Permalink
Upgrade make_env script to stop on error and also to allow selection …
Browse files Browse the repository at this point in the history
…of python version (#340)

Co-authored-by: Mark Gibbs <mark@gibbs.consulting>
  • Loading branch information
delsim and Mark Gibbs committed Jun 16, 2021
1 parent 3e27964 commit 8672841
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions make_env
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
#!/usr/bin/env bash
#
# Create a virtualenv. Note that python 3.6 is the minimal requirement
# Create a virtualenv. Note that python 3.6 is currently the minimal requirement
#
virtualenv -p python3.6 env
# Stop on error, rather than continue and trash the environment
set -e
#
# Default to 3.6 but allow override
DEFAULT_PYTHON_VER=3.6
PYTHON_VER=${1:-$DEFAULT_PYTHON_VER}
#
virtualenv -p python${PYTHON_VER} env
#
source env/bin/activate
#
Expand Down

0 comments on commit 8672841

Please sign in to comment.