Skip to content

Commit 1da1999

Browse files
committed
Add necessary devtools things
1 parent 0aee404 commit 1da1999

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-0
lines changed

devtools/miniconda_install.sh

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
#!/bin/bash
2+
3+
### Install Miniconda
4+
5+
if [ -z "$CONDA_PY" ]
6+
then
7+
CONDA_PY=3.8
8+
fi
9+
10+
if [ -z "$OS_ARCH" ]
11+
then
12+
OS_ARCH=Linux-x86_64
13+
fi
14+
15+
# universal MD5 checker
16+
MD5_CMD=`basename $(command -v md5sum || command -v md5 || command -v openssl)`
17+
declare -A opts=( ["md5"]="-r" ["openssl"]="md5 -r" ["md5sum"]="" )
18+
MD5_OPT=" ${opts[$MD5_CMD]}"
19+
20+
pyV=${CONDA_PY:0:1}
21+
conda_version="latest"
22+
#conda_version="4.4.10" # can pin a miniconda version like this, if needed
23+
24+
MINICONDA=Miniconda${pyV}-${conda_version}-${OS_ARCH}.sh
25+
MINICONDA_MD5=$(curl -s https://repo.continuum.io/miniconda/ | grep -A3 $MINICONDA | sed -n '4p' | sed -n 's/ *<td>\(.*\)<\/td> */\1/p')
26+
wget https://repo.continuum.io/miniconda/$MINICONDA
27+
SCRIPT_MD5=`eval "$MD5_CMD $MD5_OPT $MINICONDA" | cut -d ' ' -f 1`
28+
29+
if [[ $MINICONDA_MD5 != $SCRIPT_MD5 ]]; then
30+
echo "Miniconda MD5 mismatch"
31+
echo "Expected: $MINICONDA_MD5"
32+
echo "Found: $SCRIPT_MD5"
33+
exit 1
34+
fi
35+
bash $MINICONDA -b -p $HOME/miniconda${pyV}
36+
37+
conda init bash
38+
source ~/.bashrc
39+
40+
export PATH=$HOME/miniconda${pyV}/bin:$PATH
41+
42+
conda update --yes conda
43+
rm -f $MINICONDA

devtools/tests_require.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
autorelease
2+
pytest
3+
pytest-cov
4+
python-coveralls

0 commit comments

Comments
 (0)