Skip to content

Commit 3546f40

Browse files
authored
Replaced ignore-installed flag by force-reinstall (#3918)
1 parent e200ba5 commit 3546f40

File tree

1 file changed

+24
-29
lines changed

1 file changed

+24
-29
lines changed

scripts/create_testenv.sh

Lines changed: 24 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2,52 +2,47 @@
22

33
set -ex # fail on first error, print commands
44

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
1615
done
1716

1817
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
2120
}
2221

23-
ENVNAME="${ENVNAME:-testenv}" # if no ENVNAME is specified, use testenv
22+
ENVNAME="${ENVNAME:-testenv}" # if no ENVNAME is specified, use testenv
2423
PYTHON_VERSION=${PYTHON_VERSION:-3.6} # if no python specified, use 3.6
2524

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}
3532
fi
3633
pip install --upgrade pip
3734

3835
conda install --yes mkl-service
3936
conda install --yes -c conda-forge python-graphviz
4037

41-
42-
# Install editable using the setup.py
43-
4438
# 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
4741

4842
# Install untested, non-required code (linter fails without them)
4943
pip install ipython ipywidgets
5044

45+
# Install editable using the setup.py
5146
if [ -z ${NO_SETUP} ]; then
52-
python setup.py build_ext --inplace
47+
python setup.py build_ext --inplace
5348
fi

0 commit comments

Comments
 (0)