File tree Expand file tree Collapse file tree 3 files changed +30
-8
lines changed Expand file tree Collapse file tree 3 files changed +30
-8
lines changed Original file line number Diff line number Diff line change 1+ venv /
2+ .venv /
3+ _build /
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ set -e
4+
5+ CUR_DIR=$( readlink -f $( dirname " $0 " ) )
6+
7+ cd " $CUR_DIR "
8+
9+ VENV=" $CUR_DIR " /.venv
10+
11+ if [ ! -d " $VENV " ] || [ ! -e " $VENV " /bin/activate ]; then
12+ echo $( tput bold) $( tput setaf 2) " Creating new virtual environment in $VENV " $( tput sgr0)
13+ PYTHON=python3
14+ which python3.6 & > /dev/null && PYTHON=python3.6
15+ " $PYTHON " -m venv " $VENV "
16+ fi
17+
18+ source " $VENV " /bin/activate
19+
20+ # this snippet should allow us to call pip install only if the requirements file has been touched
21+ if [ ! -f " $VENV " /requirements.txt ] || [ $( sha256sum requirements.txt | cut -d' ' -f1) != $( sha256sum " $VENV " /requirements.txt | cut -d' ' -f1) ]; then
22+ echo $( tput bold) $( tput setaf 2) " Requirements updated, reinstalling" $( tput sgr0)
23+ cp requirements.txt " $VENV " /requirements.txt
24+ pip install -U -r " $VENV " /requirements.txt
25+ fi
26+
27+ make " $@ "
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments