#!/bin/bash
set -v -e
conda config --write-default
conda config --set remote_connect_timeout_secs 30.15
conda config --set remote_max_retries 10
conda config --set remote_read_timeout_secs 120.2
conda config --set show_channel_urls true
conda info
conda config --show
CONDA_INSTALL="conda install -q -y"
PIP_INSTALL="pip install -q"
EXTRA_CHANNELS=""
if [ "${USE_C3I_TEST_CHANNEL}" == "yes" ]; then
EXTRA_CHANNELS="${EXTRA_CHANNELS} -c c3i_test"
fi
source deactivate
conda list
conda create -n $CONDA_ENV -q -y ${EXTRA_CHANNELS} python=$PYTHON numpy=$NUMPY pip gitpython pyyaml
set +v
source activate $CONDA_ENV
set -v
echo "PYTHON=$PYTHON"
echo "VANILLA_INSTALL=$VANILLA_INSTALL"
if [ "${VANILLA_INSTALL}" != "yes" ]; then
if [ $PYTHON \< "3.12" ]; then
$CONDA_INSTALL ${EXTRA_CHANNELS} cffi jinja2 ipython ipykernel scipy pygments pexpect
else
$CONDA_INSTALL ${EXTRA_CHANNELS} cffi jinja2 ipython scipy pygments pexpect
fi
fi
if [[ $(uname) == Linux ]]; then
if [ $PYTHON \< "3.12" ]; then
$CONDA_INSTALL gcc_linux-64 gxx_linux-64 gdb gdb-pretty-printer
else
$CONDA_INSTALL gcc_linux-64 gxx_linux-64
fi
elif [[ $(uname) == Darwin ]]; then
$CONDA_INSTALL clang_osx-64 clangxx_osx-64
$CONDA_INSTALL llvm-openmp
fi
$CONDA_INSTALL -c numba/label/dev llvmlite=0.42
if [ "$BUILD_DOC" == "yes" ]; then $CONDA_INSTALL sphinx docutils sphinx_rtd_theme pygments numpydoc; fi
if [ "$BUILD_DOC" == "yes" ]; then $PIP_INSTALL rstcheck; fi
if [ "$RUN_COVERAGE" == "yes" ]; then $CONDA_INSTALL coverage; fi
if [ "$TEST_SVML" == "yes" ]; then $CONDA_INSTALL -c numba icc_rt; fi
if [ "$TEST_THREADING" == "tbb" ]; then $CONDA_INSTALL "tbb>=2021.6" "tbb-devel>=2021.6"; fi
if [ "$RUN_TYPEGUARD" == "yes" ]; then $CONDA_INSTALL "conda-forge::typeguard==3.0.1"; fi
if [ "$TEST_RVSDG" == "yes" ]; then $PIP_INSTALL numba-rvsdg; fi