From 4a0436ae7ce91531a65ff0bafaec9c0b5c076588 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Fri, 28 Jun 2019 16:02:12 -0700 Subject: [PATCH] Add flag to specify if GTK builds are supported --- docker/scripts/do-build.sh | 11 ++++++++++- docker/scripts/hello.sh | 5 +++++ docker/ubuntu-14.04/Dockerfile | 1 + docker/ubuntu-16.04/Dockerfile | 1 + docker/ubuntu-18.04/Dockerfile | 1 + 5 files changed, 18 insertions(+), 1 deletion(-) diff --git a/docker/scripts/do-build.sh b/docker/scripts/do-build.sh index 5cf23c2a..72c013ee 100755 --- a/docker/scripts/do-build.sh +++ b/docker/scripts/do-build.sh @@ -32,6 +32,11 @@ if [ "$TARBALL" == "" ]; then exit 1 fi +if [ $PYENV != all -a ! -d ~/venv/$PYENV ]; then + echo "ERROR: The $PYENV environment not found in the $DIST_NAME image." + exit 1 +fi + # This function is called to do each build. # It is given the Python virtualenv to be used, a tag (gtk2 or gtk3) to be @@ -42,6 +47,11 @@ function do_build { TAG=$2 FLAG=$3 + if [ $TAG = gtk2 -a $GTK2_OK = no ]; then + echo "The $DIST_NAME image does not support building for GTK2." + return + fi + rm -rf ~/wxPython-* # setup @@ -68,7 +78,6 @@ function do_build { python build.py $FLAG build_wx build_py bdist_wheel # copy the results back to the host's shared dist folder - WXPYVER=$(python -c "import buildtools; buildtools.printVersion()") DEST=/dist/linux/$TAG/$DIST_NAME mkdir -p $DEST mv dist/*.whl $DEST diff --git a/docker/scripts/hello.sh b/docker/scripts/hello.sh index 5989faac..3060b2fa 100755 --- a/docker/scripts/hello.sh +++ b/docker/scripts/hello.sh @@ -4,3 +4,8 @@ echo " User: " $(whoami) echo " ~/bin: " $(ls ~/bin) echo " ~/venvs:" $(ls ~/venvs) echo " /dist: " $(ls /dist) +echo "" + +if [ -x /usr/bin/lsb_release ]; then + /usr/bin/lsb_release -a +fi diff --git a/docker/ubuntu-14.04/Dockerfile b/docker/ubuntu-14.04/Dockerfile index c92aeaf4..40ecb919 100644 --- a/docker/ubuntu-14.04/Dockerfile +++ b/docker/ubuntu-14.04/Dockerfile @@ -8,6 +8,7 @@ ENV USER=wxpy ENV HOME=/home/$USER ENV PYTHONUNBUFFERED=1 ENV PATH=$HOME/bin:$PATH +ENV GTK2_OK=yes # Update and install basic OS packages RUN \ diff --git a/docker/ubuntu-16.04/Dockerfile b/docker/ubuntu-16.04/Dockerfile index 08b81037..0c263b5f 100644 --- a/docker/ubuntu-16.04/Dockerfile +++ b/docker/ubuntu-16.04/Dockerfile @@ -8,6 +8,7 @@ ENV USER=wxpy ENV HOME=/home/$USER ENV PYTHONUNBUFFERED=1 ENV PATH=$HOME/bin:$PATH +ENV GTK2_OK=yes # Update and install basic OS packages RUN \ diff --git a/docker/ubuntu-18.04/Dockerfile b/docker/ubuntu-18.04/Dockerfile index 9bd3a29a..54fcc6a7 100644 --- a/docker/ubuntu-18.04/Dockerfile +++ b/docker/ubuntu-18.04/Dockerfile @@ -8,6 +8,7 @@ ENV USER=wxpy ENV HOME=/home/$USER ENV PYTHONUNBUFFERED=1 ENV PATH=$HOME/bin:$PATH +ENV GTK2_OK=yes # Update and install basic OS packages RUN \