forked from CiscoDevNet/dne-dna-code
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit-dev.sh
executable file
·28 lines (20 loc) · 859 Bytes
/
init-dev.sh
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
#!/usr/bin/env bash
# Install all the development dependencies for this project.
set -e
cd "$(dirname "$0")/.."
# Ensure that packages are only installed in an active virtual environment
export PIP_REQUIRE_VIRTUALENV=true
if [ -f "Pipfile" ] && [ -n "$(pipenv --version 2>/dev/null)" ]; then
echo "==> Installing Pipfile development dependencies..."
pipenv install --dev
elif [ -f "dev-requirements.txt" ]; then
if [ -n "$(python -c 'import sys; print (sys.real_prefix)' 2>/dev/null)" ]; then
echo "==> Installing dev-requirements.txt packages in the active virtual environment..."
else
echo "==> Installing dev-requirements.txt packages in the project's 'venv' virtual environment..."
source venv/bin/activate
fi
pip install -r requirements-dev.txt
else
echo "No Python dev requirements found."
fi