compose/script/release/setup-venv.sh
Joffrey F 6a35663781 Decontainerize release script
Credentials management inside containers is a mess. Let's work on the host instead.

Signed-off-by: Joffrey F <joffrey@docker.com>
2018-10-05 08:21:39 -07:00

31 lines
662 B
Bash
Executable File

#!/bin/bash
if test -z $PYTHONBIN; then
PYTHONBIN=$(which python3)
if test -z $PYTHONBIN; then
PYTHONBIN=$(which python)
fi
fi
VERSION=$($PYTHONBIN -c "import sys; print('{}.{}'.format(*sys.version_info[0:2]))")
if test $(echo $VERSION | cut -d. -f1) -lt 3; then
echo "Python 3.3 or above is required"
fi
if test $(echo $VERSION | cut -d. -f2) -lt 3; then
echo "Python 3.3 or above is required"
fi
$PYTHONBIN -m venv ./.release-venv
VENVBINS=./.release-venv/bin
$VENVBINS/pip install -U Jinja2==2.10 \
PyGithub==1.39 \
pypandoc==1.4 \
GitPython==2.1.9 \
requests==2.18.4 \
twine==1.11.0
$VENVBINS/python setup.py develop