WIP breaking stuff: updating docker image build process for Python 3.6

This requires a new way to pass requirements.txt files to Docker (since
they now link to each other), as well as building Python ourselves (since
even Ubuntu 16.10 doesn't have a decent Python 3.6).

This is just a WIP commit, will be fixed soon(ish).
This commit is contained in:
2017-03-07 16:51:51 +01:00
parent b6f729f35e
commit af14910fa9
8 changed files with 86 additions and 34 deletions

View File

@@ -1,11 +1,33 @@
#!/usr/bin/env bash
mkdir -p ../3_run/wheelhouse;
cp ../../requirements.txt .;
# macOS does not support readlink -f, so we use greadlink instead
if [ $(uname) == 'Darwin' ]; then
command -v greadlink 2>/dev/null 2>&1 || { echo >&2 "Install greadlink using brew."; exit 1; }
readlink='greadlink'
else
readlink='readlink'
fi
docker build -t pillar_build -f build.docker .;
docker run --rm \
-v "$(pwd)"/../3_run/wheelhouse:/data/wheelhouse \
pillar_build;
TOPDEVDIR="$($readlink -f ../../..)"
echo "Top-level development dir is $TOPDEVDIR"
rm requirements.txt;
PYTHON=$($readlink -f ../3_run/python)
WHEELHOUSE="$($readlink -f ../3_run/wheelhouse)"
if [ -z "$WHEELHOUSE" -o -z "$PYTHON" ]; then
echo "Error, ../3_run might not exist." >&2
exit 2
fi
mkdir -p "$WHEELHOUSE" "$PYTHON"
echo "Wheelhouse is $WHEELHOUSE"
echo "Python will be built to $PYTHON"
docker build -t pillar_build -f build.docker .
#docker run --rm \
# -v "$WHEELHOUSE:/data/wheelhouse" \
# -v "$TOPDEVDIR:/data/topdev" \
# -v "$PYTHON:/data/python" \
# pillar_build
# RUN cd Python-3.6.0/ && ./myconfigure
# RUN cd Python-3.6.0/ && make -j8 install