forked from conda/conda
-
Notifications
You must be signed in to change notification settings - Fork 0
/
start
44 lines (37 loc) · 1.83 KB
/
start
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/sh
# NOTE: This script should be sourced! The shebang is only here to help syntax highlighters.
# # conda-build
# pip install --no-deps -U .
devenv="${1:-./devenv}"
pyver="${2:-3}"
_CONDA="$devenv/bin/conda"
if ! [ -f "$devenv/conda-meta/history" ]; then
if [ "$(uname)" = Darwin ]; then
if [ ! -f miniconda${pyver}.sh ]; then
curl https://repo.anaconda.com/miniconda/Miniconda${pyver}-latest-MacOSX-x86_64.sh -o miniconda${pyver}.sh
fi
bash miniconda${pyver}.sh -bfp "$devenv"
"${_CONDA}" install -yq -p $devenv python=$pyver --file dev/test-requirements.txt -c defaults
elif [ "$(uname)" = Linux ]; then
if [ ! -f miniconda${pyver}.sh ]; then
curl https://repo.anaconda.com/miniconda/Miniconda${pyver}-latest-Linux-x86_64.sh -o miniconda${pyver}.sh
fi
bash miniconda${pyver}.sh -bfp "$devenv"
"${_CONDA}" install -yq -p $devenv python=$pyver --file dev/test-requirements.txt -c defaults
"${_CONDA}" install -yq -p $devenv patchelf # for conda-build
else
if [ ! -f miniconda${pyver}.exe ]; then
powershell.exe -Command "(new-object System.Net.WebClient).DownloadFile('https://repo.anaconda.com/miniconda/Miniconda$pyver-latest-Windows-x86_64.exe','miniconda${pyver}.exe')"
fi
cmd.exe /c "start /wait \"\" miniconda${pyver}.exe /InstallationType=JustMe /RegisterPython=0 /AddToPath=0 /S /D=%CD%\$(cygpath -w $devenv)"
_CONDA="$devenv/Scripts/conda"
fi
fi
if ! [ -f "$devenv/.dev-start-ed" ]; then
"${_CONDA}" install -yq -p $devenv python=$pyver --file dev/test-requirements.txt -c defaults
touch "$devenv/.dev-start-ed"
fi
case "$(uname)" in
Darwin|Linux) eval "$($devenv/bin/python -m conda init --dev bash)" ;;
*) eval "$($devenv/python -m conda init --dev bash)" ;;
esac