#!/bin/bash set -ex CODE_PATH=/code VENV="${CODE_PATH}"/.tox/py37 cd "${CODE_PATH}" mkdir -p dist chmod 777 dist "${VENV}"/bin/pip3 install -q -r requirements-build.txt # TODO(ulyssessouza) To check if really needed if [ -z "${DOCKER_COMPOSE_GITSHA}" ]; then DOCKER_COMPOSE_GITSHA="$(script/build/write-git-sha)" fi echo "${DOCKER_COMPOSE_GITSHA}" > compose/GITSHA export PATH="${CODE_PATH}/pyinstaller:${PATH}" if [ ! -z "${BUILD_BOOTLOADER}" ]; then # Build bootloader for alpine; develop is the main branch git clone --single-branch --branch develop https://github.com/pyinstaller/pyinstaller.git /tmp/pyinstaller cd /tmp/pyinstaller/bootloader # Checkout commit corresponding to version in requirements-build git checkout v3.5 "${VENV}"/bin/python3 ./waf configure --no-lsb all "${VENV}"/bin/pip3 install .. cd "${CODE_PATH}" rm -Rf /tmp/pyinstaller else echo "NOT compiling bootloader!!!" fi "${VENV}"/bin/pyinstaller --exclude-module pycrypto --exclude-module PyInstaller docker-compose.spec ls -la dist/ ldd dist/docker-compose mv dist/docker-compose /usr/local/bin docker-compose version