-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdev-setup.bash
executable file
·33 lines (30 loc) · 1002 Bytes
/
dev-setup.bash
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
#!/usr/bin/env bash
# Get the directory where this script lives
DIR="$(cd "$(dirname "$0")" && pwd)"
CLOUD_INSTANCE=
[[ -d /var/lib/cloud/instance ]] && CLOUD_INSTANCE=yes
cd "$DIR"
pip_args=(--no-warn-script-location --upgrade --upgrade-strategy eager)
PYTHON="python3"
PIP="venv/bin/pip3"
if [[ $(uname) =~ "MINGW" ]]; then
PYTHON="python"
PIP="venv/Scripts/pip"
fi
if [[ "$1" == "clean" ]]; then
rm -rf venv
find . \( -name __pycache__ -o -name '.eggs' -o -name '*.egg-info' -o -name 'build' -o -name 'dist' \) -print0 |
xargs -0 rm -rf
fi
[[ ! -d venv ]] && $PYTHON -m venv venv
PYTHON=$(dirname $PIP)/python
$PYTHON -m pip install --upgrade pip wheel
extra_packages=(ipython)
if [[ ! $(uname) =~ "MINGW" ]]; then
if [[ $(uname) == "Darwin" ]]; then
extra_packages+=(pdbpp mocp mocp-cli)
elif [[ -z "$CLOUD_INSTANCE" ]]; then
extra_packages+=(pdbpp mocp mocp-cli vlc-helper)
fi
fi
$PIP install ${extra_packages[@]} ${pip_args[@]} --editable .