|
2 | 2 |
|
3 | 3 | set -ex # fail on first error, print commands
|
4 | 4 |
|
5 |
| -while test $# -gt 0 |
6 |
| -do |
7 |
| - case "$1" in |
8 |
| - --global) |
9 |
| - GLOBAL=1 |
10 |
| - ;; |
11 |
| - --no-setup) |
12 |
| - NO_SETUP=1 |
13 |
| - ;; |
14 |
| - esac |
15 |
| - shift |
| 5 | +while test $# -gt 0; do |
| 6 | + case "$1" in |
| 7 | + --global) |
| 8 | + GLOBAL=1 |
| 9 | + ;; |
| 10 | + --no-setup) |
| 11 | + NO_SETUP=1 |
| 12 | + ;; |
| 13 | + esac |
| 14 | + shift |
16 | 15 | done
|
17 | 16 |
|
18 | 17 | command -v conda >/dev/null 2>&1 || {
|
19 |
| - echo "Requires conda but it is not installed. Run install_miniconda.sh." >&2; |
20 |
| - exit 1; |
| 18 | + echo "Requires conda but it is not installed. Run install_miniconda.sh." >&2 |
| 19 | + exit 1 |
21 | 20 | }
|
22 | 21 |
|
23 |
| -ENVNAME="${ENVNAME:-testenv}" # if no ENVNAME is specified, use testenv |
| 22 | +ENVNAME="${ENVNAME:-testenv}" # if no ENVNAME is specified, use testenv |
24 | 23 | PYTHON_VERSION=${PYTHON_VERSION:-3.6} # if no python specified, use 3.6
|
25 | 24 |
|
26 |
| -if [ -z ${GLOBAL} ] |
27 |
| -then |
28 |
| - if conda env list | grep -q ${ENVNAME} |
29 |
| - then |
30 |
| - echo "Environment ${ENVNAME} already exists, keeping up to date" |
31 |
| - else |
32 |
| - conda create -n ${ENVNAME} --yes pip python=${PYTHON_VERSION} |
33 |
| - fi |
34 |
| - source activate ${ENVNAME} |
| 25 | +if [ -z ${GLOBAL} ]; then |
| 26 | + if conda env list | grep -q ${ENVNAME}; then |
| 27 | + echo "Environment ${ENVNAME} already exists, keeping up to date" |
| 28 | + else |
| 29 | + conda create -n ${ENVNAME} --yes pip python=${PYTHON_VERSION} |
| 30 | + fi |
| 31 | + source activate ${ENVNAME} |
35 | 32 | fi
|
36 | 33 | pip install --upgrade pip
|
37 | 34 |
|
38 | 35 | conda install --yes mkl-service
|
39 | 36 | conda install --yes -c conda-forge python-graphviz
|
40 | 37 |
|
41 |
| - |
42 |
| -# Install editable using the setup.py |
43 |
| - |
44 | 38 | # Travis env is unable to import cached mpl sometimes https://github.com/pymc-devs/pymc3/issues/3423
|
45 |
| -pip install --no-cache-dir --ignore-installed -e . |
46 |
| -pip install --no-cache-dir --ignore-installed -r requirements-dev.txt |
| 39 | +pip install --no-cache-dir --force-reinstall -e . |
| 40 | +pip install --no-cache-dir --force-reinstall -r requirements-dev.txt |
47 | 41 |
|
48 | 42 | # Install untested, non-required code (linter fails without them)
|
49 | 43 | pip install ipython ipywidgets
|
50 | 44 |
|
| 45 | +# Install editable using the setup.py |
51 | 46 | if [ -z ${NO_SETUP} ]; then
|
52 |
| - python setup.py build_ext --inplace |
| 47 | + python setup.py build_ext --inplace |
53 | 48 | fi
|
0 commit comments