File: project_bootstrap.sh

package info (click to toggle)
behave 1.2.6-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,160 kB
  • sloc: python: 19,857; makefile: 137; sh: 18
file content (30 lines) | stat: -rwxr-xr-x 859 bytes parent folder | download | duplicates (3)
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
#!/bin/sh
# =============================================================================
# BOOTSTRAP PROJECT: Download all requirements
# =============================================================================
# : ${PIP_INDEX_URL="https://pypi.python.org/simple"}
# test ${PIP_DOWNLOADS_DIR} || mkdir -p ${PIP_DOWNLOADS_DIR}
# tox -e init
# export PIP_DOWNLOAD_DIR

set -e

# -- CONFIGURATION:
HERE=`dirname $0`
TOP="${HERE}/.."
: ${PIP_DOWNLOAD_DIR:="${TOP}/downloads"}
REQUIREMENTS_FILE=${TOP}/py.requirements/all.txt

if [ $# -ge 1 ]; then
    PIP_DOWNLOAD_DIR="$1"
fi
if [ $# -ge 2 ]; then
    REQUIREMENTS_FILE="$2"
fi

# -- EXECUTE STEPS:
echo "USING: PIP_DOWNLOAD_DIR=${PIP_DOWNLOAD_DIR}"
${HERE}/toxcmd.py mkdir ${PIP_DOWNLOAD_DIR}
pip install --download=${PIP_DOWNLOAD_DIR} -r ${REQUIREMENTS_FILE}
${HERE}/make_localpi.py ${PIP_DOWNLOAD_DIR}