Debian Codegraph @

bin/project_bootstrap.sh

raw
1 #!/bin/sh
2 # =============================================================================
3 # BOOTSTRAP PROJECT: Download all requirements
4 # =============================================================================
5 # : ${PIP_INDEX_URL="https://pypi.python.org/simple"}
6 # test ${PIP_DOWNLOADS_DIR} || mkdir -p ${PIP_DOWNLOADS_DIR}
7 # tox -e init
8 # export PIP_DOWNLOAD_DIR
9
10 set -e
11
12 # -- CONFIGURATION:
13 HERE=`dirname $0`
14 TOP="${HERE}/.."
15 : ${PIP_DOWNLOAD_DIR:="${TOP}/downloads"}
16 REQUIREMENTS_FILE=${TOP}/py.requirements/all.txt
17
18 if [ $# -ge 1 ]; then
19 PIP_DOWNLOAD_DIR="$1"
20 fi
21 if [ $# -ge 2 ]; then
22 REQUIREMENTS_FILE="$2"
23 fi
24
25 # -- EXECUTE STEPS:
26 echo "USING: PIP_DOWNLOAD_DIR=${PIP_DOWNLOAD_DIR}"
27 ${HERE}/toxcmd.py mkdir ${PIP_DOWNLOAD_DIR}
28 pip install --download=${PIP_DOWNLOAD_DIR} -r ${REQUIREMENTS_FILE}
29 ${HERE}/make_localpi.py ${PIP_DOWNLOAD_DIR}
30