Unverified Commit 3546f401 authored by Alexandre ANDORRA's avatar Alexandre ANDORRA Committed by GitHub

Replaced ignore-installed flag by force-reinstall (#3918)

parent e200ba5c
...@@ -2,52 +2,47 @@ ...@@ -2,52 +2,47 @@
set -ex # fail on first error, print commands set -ex # fail on first error, print commands
while test $# -gt 0 while test $# -gt 0; do
do case "$1" in
case "$1" in --global)
--global) GLOBAL=1
GLOBAL=1 ;;
;; --no-setup)
--no-setup) NO_SETUP=1
NO_SETUP=1 ;;
;; esac
esac shift
shift
done done
command -v conda >/dev/null 2>&1 || { command -v conda >/dev/null 2>&1 || {
echo "Requires conda but it is not installed. Run install_miniconda.sh." >&2; echo "Requires conda but it is not installed. Run install_miniconda.sh." >&2
exit 1; exit 1
} }
ENVNAME="${ENVNAME:-testenv}" # if no ENVNAME is specified, use testenv ENVNAME="${ENVNAME:-testenv}" # if no ENVNAME is specified, use testenv
PYTHON_VERSION=${PYTHON_VERSION:-3.6} # if no python specified, use 3.6 PYTHON_VERSION=${PYTHON_VERSION:-3.6} # if no python specified, use 3.6
if [ -z ${GLOBAL} ] if [ -z ${GLOBAL} ]; then
then if conda env list | grep -q ${ENVNAME}; then
if conda env list | grep -q ${ENVNAME} echo "Environment ${ENVNAME} already exists, keeping up to date"
then else
echo "Environment ${ENVNAME} already exists, keeping up to date" conda create -n ${ENVNAME} --yes pip python=${PYTHON_VERSION}
else fi
conda create -n ${ENVNAME} --yes pip python=${PYTHON_VERSION} source activate ${ENVNAME}
fi
source activate ${ENVNAME}
fi fi
pip install --upgrade pip pip install --upgrade pip
conda install --yes mkl-service conda install --yes mkl-service
conda install --yes -c conda-forge python-graphviz conda install --yes -c conda-forge python-graphviz
# Install editable using the setup.py
# Travis env is unable to import cached mpl sometimes https://github.com/pymc-devs/pymc3/issues/3423 # Travis env is unable to import cached mpl sometimes https://github.com/pymc-devs/pymc3/issues/3423
pip install --no-cache-dir --ignore-installed -e . pip install --no-cache-dir --force-reinstall -e .
pip install --no-cache-dir --ignore-installed -r requirements-dev.txt pip install --no-cache-dir --force-reinstall -r requirements-dev.txt
# Install untested, non-required code (linter fails without them) # Install untested, non-required code (linter fails without them)
pip install ipython ipywidgets pip install ipython ipywidgets
# Install editable using the setup.py
if [ -z ${NO_SETUP} ]; then if [ -z ${NO_SETUP} ]; then
python setup.py build_ext --inplace python setup.py build_ext --inplace
fi fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment