Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#! /bin/bash
set -e
set -x
PY_EXE="$1"
if test "$PY_EXE" = ""; then
PY_EXE="python3.6"
fi
shift
echo "-----------------------------------------------"
echo "Current directory: $(pwd)"
echo "Python executable: ${PY_EXE}"
echo "-----------------------------------------------"
# {{{ clean up
rm -Rf .env
rm -Rf build
find . -name '*.pyc' -delete
rm -Rf env
git clean -fdx -e siteconf.py -e boost-numeric-bindings -e local_settings.py
if test `find "siteconf.py" -mmin +1`; then
echo "siteconf.py older than a minute, assumed stale, deleted"
rm -f siteconf.py
fi
# }}}
# {{{ virtualenv
${PY_EXE} -m venv .env
. .env/bin/activate
${PY_EXE} -m ensurepip
# }}}
$PY_EXE -m pip install .
git clone https://github.com/inducer/relate-sample
cd relate-sample
relate validate .
relate test-code questions/autograded-python-example.yml
relate expand-yaml flows/quiz-test.yml > /dev/null