Merge pull request #1298 from wxWidgets/docker

Switch from Vagrant to Docker
This commit is contained in:
Robin Dunn
2019-07-08 20:52:58 -07:00
committed by GitHub
36 changed files with 877 additions and 654 deletions

View File

@@ -58,7 +58,10 @@ Other changes in this release:
wxPython for compatibility, but with a zero value. You can just stop using it
in your code with no change in behavior. (#1278)
* Replaced the Vagrant VMs used for building wxPython for various Linux distros
with Docker images.
4.0.6 "Applesauce"

View File

@@ -447,7 +447,7 @@ def makeOptionParser():
("jom", (False, "Use jom instead of nmake for the wxMSW build")),
("pytest_timeout", ("0", "Timeout, in seconds, for stopping stuck test cases. (Currently not working as expected, so disabled by default.)")),
("pytest_jobs", ("", "Number of parallel processes py.test should run")),
("vagrant_vms", ("all", "Comma separated list of VM names to use for the build_vagrant command. Defaults to \"all\"")),
("docker_img", ("all", "Comma separated list of image tags to use for the build_docker command. Defaults to \"all\"")),
("dump_waf_log", (False, "If the waf build tool fails then using this option will cause waf's configure log to be printed")),
("regenerate_sysconfig", (False, "Waf uses Python's sysconfig and related tools to configure the build. In some cases that info can be incorrect, so this option regenerates it. Must have write access to Python's lib folder.")),
]
@@ -1613,37 +1613,25 @@ def cmd_build_py(options, args):
print("")
def cmd_build_vagrant(options, args):
# Does a build and bdist_wheel for each of the Vagrant based VMs defined
# in {phoenixDir}/vagrant. Requires Vagrant and VirtualBox to be installed
# and ready for use. Also requires a source tarball to be present in
# {phoenixDir}/dist, such as what is produced with cmd_sdist.
cmdTimer = CommandTimer('bdist_vagrant')
def cmd_build_docker(options, args):
# Uses docker images defined by the Dockerfiles under ./docker/build for
# building wxPython wheels for a few versions of Linux.
#
# Requirements: Docker
# Internet connection for downloading docker images, if needed
# One wxPython source archive in ./dist (created with cmd_sdist)
cmdTimer = CommandTimer('bdist_docker')
cfg = Config(noWxConfig=True)
if not options.vagrant_vms or options.vagrant_vms == 'all':
VMs = [ 'centos-7 all all',
'debian-8 all all',
'debian-9 all all',
'fedora-26 all all',
'fedora-27 all gtk3', # no webkitgtk for gtk2
'fedora-28 all gtk3', # no webkitgtk for gtk2
'ubuntu-14.04 all all',
'ubuntu-16.04 all all',
'ubuntu-18.04 all all',
]
elif options.vagrant_vms == 'none':
VMs = [] # to skip building anything and just upload
else:
VMs = options.vagrant_vms.split(',')
cmd = ['inv', 'build-wxpython']
if options.docker_img != 'all':
for img in options.docker_img.split(','):
cmd.append('-i')
cmd.append(img)
for vmName in VMs:
vmDir = opj(phoenixDir(), 'vagrant', vmName.split()[0])
pwd = pushDir(vmDir)
msg('Starting Vagrant VM in {}'.format(vmDir))
runcmd('vagrant up')
runcmd('vagrant ssh -c "scripts/build.sh %s"' % vmName)
runcmd('vagrant halt')
del pwd
# 'none' can be used to skip building and go straight to uploading
if options.docker_img != 'none':
pwd = pushDir('docker')
runcmd(cmd, echoCmd=True)
if options.upload:
for tag in ['gtk2', 'gtk3']:
@@ -1859,8 +1847,8 @@ def cmd_clean(options, args):
cmd_clean_py(options, args)
def cmd_clean_vagrant(options, args):
cmdTimer = CommandTimer('clean_vagrant')
def cmd_clean_docker(options, args):
cmdTimer = CommandTimer('clean_docker')
assert os.getcwd() == phoenixDir()
d = opj(phoenixDir(), 'dist', 'linux')

77
docker/README.rst Normal file
View File

@@ -0,0 +1,77 @@
Building wxPython4 with Docker
==============================
Introduction
------------
Docker is a relatively lightweight system for deploying containers with a
specified set of software running within them. A Docker container is less than a
virtual machine, but more than a chroot, and will typically be much more
performant than a VM, (sub-second startup time, less resource hungry, etc.)
Typically they would be used for deploying "containerized applications", but a
docker image can easily be created with all that's needed for building software
too.
The file and folders in this subtree provide the Dockerfiles and scripts needed
to build the Docker images, as well as for using those images to build wxPython
wheels for various Linux distributions. A current set of images are available on
Docker Hub at https://hub.docker.com/r/wxpython4/build. There is an image there
tagged with the same names as those in the ./build folder. For example, as of
this writing you can pull images with these names and tags:
wxpython4/build:centos-7
wxpython4/build:debian-9
wxpython4/build:debian-10
wxpython4/build:fedora-29
wxpython4/build:fedora-30
wxpython4/build:ubuntu-14.04
wxpython4/build:ubuntu-16.04
wxpython4/build:ubuntu-18.04
Building Images
---------------
Since images are available on DockerHub there shouldn't be much need for
building them yourself, but just in case, here is how to do it. All images
can be built with a simple command like this::
inv build-images
And one or more specific images can be built like this::
inv build-images -i debian-10 -i ubuntu-18.04
The ``inv`` command comes from the ``invoke`` package, which can be downloaded
and installed from PyPI. It loads a set of tasks from the ``tasks.py`` file in
this folder, and provides a command line interface for running those tasks.
Building wxPython
-----------------
To perform a build there must be one (and only one) wxPython source tarball
located in the ``../dist`` folder. This source archive can either be generated
with the ``build.py dox etg sip sdist`` command, or it can be downloaded from a
wxPython release on PyPI, or it can come from the wxPython snapshots server for
prerelease versions of the software.
With that source archive in place then a build for a specific distro can be done
like this (see the paragraph about ``invoke`` above)::
inv build-wxpython -i ubuntu-18.04
That will do build for all Pythons that are set up in the image, and both gtk2
and gtk3 if the image supports gtk2 (some don't.) To narrow the build down to
just one Python and one port, a command like this can be used::
inv build-wxpython -i ubuntu-18.04 -p gtk3 -v Py37
And a bare ``inv build-wxpython`` will cause a build to be done for all distros,
all supported Pythons, and all supported ports. This will take a little while to
accomplish. Go binge-watch something on Netflix while you're waiting...
When the build(s) are finished the results will be placed in the
``../dist/linux`` folder, using the same folder structure for distros and ports
as is used on https://extras.wxpython.org/wxPython4/extras/linux/

View File

@@ -0,0 +1,65 @@
# The base image
FROM centos:7
# Set environment variables
ENV DIST_NAME=centos-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 \
yum -y install https://centos7.iuscommunity.org/ius-release.rpm; \
yum -y update; \
yum -y group install development; \
yum -y install sudo nano which; \
# Set up a user, and etc.
mkdir -p /dist; \
adduser -m ${USER}; \
echo "${USER} ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers; \
# Install development packages needed for building wxPython
yum -y install \
freeglut-devel \
gstreamer1-devel \
gstreamer1-plugins-base-devel \
gtk2-devel \
gtk3-devel \
libjpeg-turbo-devel \
libnotify \
libnotify-devel \
libpng-devel \
libSM-devel \
libtiff-devel \
libXtst-devel \
SDL-devel \
webkitgtk-devel \
webkitgtk3-devel \
webkitgtk4-devel; \
# Install all available Python packages and their dev packages
yum -y install python python-tools python-devel python-virtualenv; \
yum -y install python36u python36u-tools python36u-devel; \
# CLean up the yum caches
yum clean all;
# Set the user and group to use for the rest of the commands
USER ${USER}:${USER}
# Set the working directory
WORKDIR ${HOME}
# Create virtual environments for each Python
RUN \
cd ${HOME}; \
mkdir -p ${HOME}/venvs; \
python2.7 -m virtualenv --python=python2.7 venvs/Py27; \
python3.6 -m venv venvs/Py36;
# Add files from host into the container
COPY scripts ${HOME}/bin
# Define default command
CMD ["/bin/bash", "-l"]

View File

@@ -0,0 +1,67 @@
# The base image (v10 == "buster")
FROM debian:buster
# Set environment variables
ENV DIST_NAME=debian-10
ENV USER=wxpy
ENV HOME=/home/$USER
ENV PYTHONUNBUFFERED=1
ENV PATH=$HOME/bin:$PATH
ENV GTK2_OK=no
# Update and install basic OS packages
RUN \
apt-get update; \
apt-get upgrade -y; \
apt-get install -y \
apt-utils \
build-essential \
software-properties-common \
sudo nano; \
# Set up a user, and etc.
mkdir -p /dist; \
adduser --disabled-password --gecos "" ${USER}; \
echo "${USER} ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers; \
# Install development packages needed for building wxPython
apt-get install -y \
freeglut3 \
freeglut3-dev \
libgl1-mesa-dev \
libglu1-mesa-dev \
libgstreamer-plugins-base1.0-dev \
libgtk-3-dev \
libjpeg-dev \
libnotify-dev \
libsdl2-dev \
libsm-dev \
libtiff-dev \
libwebkit2gtk-4.0-dev \
libxtst-dev; \
apt-get clean;
# Install all available Python packages and their dev packages
RUN \
apt-get install -y python2.7 python2.7-dev libpython2.7-dev python-virtualenv; \
apt-get install -y python3.7 python3.7-dev libpython3.7-dev python3.7-venv; \
apt-get clean;
# Set the user and group to use for the rest of the commands
USER ${USER}:${USER}
# Set the working directory
WORKDIR ${HOME}
# Create virtual environments for each Python
RUN \
cd ${HOME}; \
mkdir -p ${HOME}/venvs; \
virtualenv --python=python2.7 venvs/Py27; \
python3.7 -m venv venvs/Py37;
# Add files from host into the container
COPY scripts ${HOME}/bin
# Define default command
CMD ["/bin/bash", "-l"]

View File

@@ -0,0 +1,69 @@
# The base image (v9 == "stretch")
FROM debian:stretch
# Set environment variables
ENV DIST_NAME=debian-9
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 \
apt-get update; \
apt-get upgrade -y; \
apt-get install -y \
apt-utils \
build-essential \
software-properties-common \
sudo nano; \
# Set up a user, and etc.
mkdir -p /dist; \
adduser --disabled-password --gecos "" ${USER}; \
echo "${USER} ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers; \
# Install development packages needed for building wxPython
apt-get install -y \
freeglut3 \
freeglut3-dev \
libgl1-mesa-dev \
libglu1-mesa-dev \
libgstreamer-plugins-base1.0-dev \
libgtk-3-dev \
libgtk2.0-dev \
libjpeg-dev \
libnotify-dev \
libsdl2-dev \
libsm-dev \
libtiff-dev \
libwebkit2gtk-4.0-dev \
libwebkitgtk-dev \
libxtst-dev; \
apt-get clean;
# Install all available Python packages and their dev packages
RUN \
apt-get install -y python2.7 python2.7-dev libpython2.7-dev python-virtualenv; \
apt-get install -y python3.5 python3.5-dev libpython3.5-dev python3.5-venv; \
apt-get clean;
# Set the user and group to use for the rest of the commands
USER ${USER}:${USER}
# Set the working directory
WORKDIR ${HOME}
# Create virtual environments for each Python
RUN \
cd ${HOME}; \
mkdir -p ${HOME}/venvs; \
virtualenv --python=python2.7 venvs/Py27; \
python3.5 -m venv venvs/Py35;
# Add files from host into the container
COPY scripts ${HOME}/bin
# Define default command
CMD ["/bin/bash", "-l"]

View File

@@ -0,0 +1,62 @@
# The base image
FROM fedora:29
# Set environment variables
ENV DIST_NAME=fedora-29
ENV USER=wxpy
ENV HOME=/home/$USER
ENV PYTHONUNBUFFERED=1
ENV PATH=$HOME/bin:$PATH
ENV GTK2_OK=no
# Update and install basic OS packages
RUN \
dnf -y update; \
dnf -y group install "Development Tools"; \
dnf -y install gcc-c++ sudo nano; \
# Set up a user, and etc.
mkdir -p /dist; \
adduser -m ${USER}; \
echo "${USER} ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers; \
# Install development packages needed for building wxPython
dnf install -y \
freeglut-devel \
gstreamer1-devel \
gstreamer1-plugins-base-devel \
gtk3-devel \
libjpeg-turbo-devel \
libnotify-devel \
libpng-devel \
libSM-devel \
libtiff-devel \
libXtst-devel \
SDL-devel \
webkit2gtk3-devel; \
# Install all available Python packages and their dev packages
dnf -y install python2 python2-tools python2-devel python2-virtualenv; \
dnf -y install python3 python3-tools python3-devel; \
dnf -y install python36; \
# CLean up dnf caches
dnf clean all;
# Set the user and group to use for the rest of the commands
USER ${USER}:${USER}
# Set the working directory
WORKDIR ${HOME}
# Create virtual environments for each Python
RUN \
cd ${HOME}; \
mkdir -p ${HOME}/venvs; \
python2.7 -m virtualenv --python=python2.7 venvs/Py27; \
python3.6 -m venv venvs/Py36; \
python3.7 -m venv venvs/Py37;
# Add files from host into the container
COPY scripts ${HOME}/bin
# Define default command
CMD ["/bin/bash", "-l"]

View File

@@ -0,0 +1,62 @@
# The base image
FROM fedora:30
# Set environment variables
ENV DIST_NAME=fedora-30
ENV USER=wxpy
ENV HOME=/home/$USER
ENV PYTHONUNBUFFERED=1
ENV PATH=$HOME/bin:$PATH
ENV GTK2_OK=no
# Update and install basic OS packages
RUN \
dnf -y update; \
dnf -y group install "Development Tools"; \
dnf -y install gcc-c++ sudo nano; \
# Set up a user, and etc.
mkdir -p /dist; \
adduser -m ${USER}; \
echo "${USER} ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers; \
# Install development packages needed for building wxPython
dnf install -y \
freeglut-devel \
gstreamer1-devel \
gstreamer1-plugins-base-devel \
gtk3-devel \
libjpeg-turbo-devel \
libnotify-devel \
libpng-devel \
libSM-devel \
libtiff-devel \
libXtst-devel \
SDL-devel \
webkit2gtk3-devel; \
# Install all available Python packages and their dev packages
dnf -y install python2 python2-tools python2-devel python2-virtualenv; \
dnf -y install python3 python3-tools python3-devel; \
dnf -y install python36; \
# CLean up dnf caches
dnf clean all;
# Set the user and group to use for the rest of the commands
USER ${USER}:${USER}
# Set the working directory
WORKDIR ${HOME}
# Create virtual environments for each Python
RUN \
cd ${HOME}; \
mkdir -p ${HOME}/venvs; \
python2.7 -m virtualenv --python=python2.7 venvs/Py27; \
python3.6 -m venv venvs/Py36; \
python3.7 -m venv venvs/Py37;
# Add files from host into the container
COPY scripts ${HOME}/bin
# Define default command
CMD ["/bin/bash", "-l"]

View File

@@ -0,0 +1,74 @@
# The base image (v14.04 == "trusty")
FROM ubuntu:14.04
# Set environment variables
ENV DIST_NAME=ubuntu-14.04
ENV USE_DEADSNAKES=yes
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 \
mkdir -p /dist; \
adduser --disabled-password --gecos "" ${USER}; \
echo "${USER} ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers; \
apt-get update; \
apt-get upgrade -y; \
apt-get install -y \
apt-utils \
build-essential \
software-properties-common \
nano; \
# Install development packages needed for building wxPython
apt-get install -y \
freeglut3 \
freeglut3-dev \
libegl1-mesa-dev \
libgl1-mesa-dev \
libgles2-mesa-dev \
libglu1-mesa-dev \
libgstreamer-plugins-base1.0-dev \
libgtk-3-dev \
libgtk2.0-dev \
libjpeg-dev \
libnotify-dev \
libsdl2-dev \
libsm-dev \
libtiff-dev \
libwebkitgtk-3.0-dev \
libwebkitgtk-dev \
libxtst-dev; \
apt-get clean;
# Install all available Python packages and their dev packages
RUN \
if [ ${USE_DEADSNAKES} = yes ]; then add-apt-repository ppa:deadsnakes/ppa; apt-get update; fi; \
apt-get install -y python2.7 python2.7-dev libpython2.7-dev python-virtualenv; \
apt-get install -y python3.5 python3.5-dev libpython3.5-dev python3.5-venv; \
apt-get install -y python3.6 python3.6-dev libpython3.6-dev python3.6-venv; \
apt-get clean;
# Set the user and group to use for the rest of the commands
USER ${USER}:${USER}
# Set the working directory
WORKDIR ${HOME}
# Create virtual environments for each Python
RUN \
cd ${HOME}; \
mkdir -p ${HOME}/venvs; \
virtualenv --python=python2.7 venvs/Py27; \
python3.5 -m venv venvs/Py35; \
python3.6 -m venv venvs/Py36;
# Add files from host into the container
COPY scripts ${HOME}/bin
# Define default command
CMD ["/bin/bash", "-l"]

View File

@@ -0,0 +1,72 @@
# The base image (v16.04 == "xenial")
FROM ubuntu:16.04
# Set environment variables
ENV DIST_NAME=ubuntu-16.04
ENV USE_DEADSNAKES=yes
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 \
mkdir -p /dist; \
adduser --disabled-password --gecos "" ${USER}; \
echo "${USER} ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers; \
apt-get update; \
apt-get upgrade -y; \
apt-get install -y \
apt-utils \
build-essential \
software-properties-common \
nano; \
# Install development packages needed for building wxPython
apt-get install -y \
freeglut3 \
freeglut3-dev \
libgl1-mesa-dev \
libglu1-mesa-dev \
libgstreamer-plugins-base1.0-dev \
libgtk-3-dev \
libgtk2.0-dev \
libjpeg-dev \
libnotify-dev \
libsdl2-dev \
libsm-dev \
libtiff-dev \
libwebkitgtk-3.0-dev \
libwebkitgtk-dev \
libxtst-dev; \
apt-get clean;
# Install all available Python packages and their dev packages
RUN \
if [ ${USE_DEADSNAKES} = yes ]; then add-apt-repository ppa:deadsnakes/ppa; apt-get update; fi; \
apt-get install -y python2.7 python2.7-dev libpython2.7-dev python-virtualenv; \
apt-get install -y python3.6 python3.6-dev libpython3.6-dev python3.6-venv; \
apt-get install -y python3.7 python3.7-dev libpython3.7-dev python3.7-venv; \
apt-get clean;
# Set the user and group to use for the rest of the commands
USER ${USER}:${USER}
# Set the working directory
WORKDIR ${HOME}
# Create virtual environments for each Python
RUN \
cd ${HOME}; \
mkdir -p ${HOME}/venvs; \
virtualenv --python=python2.7 venvs/Py27; \
python3.6 -m venv venvs/Py36; \
python3.7 -m venv venvs/Py37;
# Add files from host into the container
COPY scripts ${HOME}/bin
# Define default command
CMD ["/bin/bash", "-l"]

View File

@@ -0,0 +1,77 @@
# The base image (v18.04 == "bionic")
FROM ubuntu:18.04
# Set environment variables
ENV DIST_NAME=ubuntu-18.04
ENV USE_DEADSNAKES=no
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 \
apt-get update; \
apt-get upgrade -y; \
apt-get install -y \
apt-utils \
build-essential \
software-properties-common \
sudo nano; \
# Set up a user, and sudo
mkdir -p /dist; \
adduser --disabled-password --gecos "" ${USER}; \
echo "${USER} ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers; \
# Set a timezone
DEBIAN_FRONTEND=noninteractive apt-get install -y tzdata; \
ln -fs /usr/share/zoneinfo/America/Los_Angeles /etc/localtime; \
dpkg-reconfigure -f noninteractive tzdata; \
# Install development packages needed for building wxPython
apt-get install -y \
freeglut3 \
freeglut3-dev \
libgl1-mesa-dev \
libglu1-mesa-dev \
libgstreamer-plugins-base1.0-dev \
libgtk-3-dev \
libgtk2.0-dev \
libjpeg-dev \
libnotify-dev \
libsdl2-dev \
libsm-dev \
libtiff-dev \
libwebkit2gtk-4.0-dev \
libwebkitgtk-dev \
libxtst-dev; \
apt-get clean;
# Install all available Python packages and their dev packages
RUN \
if [ ${USE_DEADSNAKES} = yes ]; then add-apt-repository ppa:deadsnakes/ppa; apt-get update; fi; \
apt-get install -y python2.7 python2.7-dev libpython2.7-dev python-virtualenv; \
apt-get install -y python3.6 python3.6-dev libpython3.6-dev python3.6-venv; \
apt-get install -y python3.7 python3.7-dev libpython3.7-dev python3.7-venv; \
apt-get clean;
# Add files from host into the container
COPY scripts ${HOME}/bin
RUN chown -R ${USER}:${USER} ${HOME}/bin
# Set the user and group to use for the rest of the commands
USER ${USER}:${USER}
# Set the working directory
WORKDIR ${HOME}
# Create virtual environments for each Python
RUN \
cd ${HOME}; \
mkdir -p ${HOME}/venvs; \
virtualenv --python=python2.7 venvs/Py27; \
python3.6 -m venv venvs/Py36; \
python3.7 -m venv venvs/Py37;
# Define default command
CMD ["/bin/bash", "-l"]

View File

@@ -0,0 +1,26 @@
FROM wxpython4/build:fedora-30
RUN sudo dnf -y install tigervnc-server xterm
RUN mkdir ~/.vnc
# RUN sudo dnf -y install fluxbox
# RUN echo "fluxbox &"> ~/.vnc/xstartup
# RUN sudo dnf -y install @xfce-desktop-environment
# RUN echo "startxfce4 &"> ~/.vnc/xstartup
RUN sudo dnf -y install --allowerasing @mate-desktop-environment
RUN echo "mate-session &"> ~/.vnc/xstartup
# RUN sudo dnf -y install @lxde-desktop-environment
# RUN echo "startlxde &"> ~/.vnc/xstartup
RUN sudo dnf -y remove *screensaver*
RUN sudo dnf clean all
RUN chmod u+x ~/.vnc/xstartup
RUN echo "password" | vncpasswd -f >> ~/.vnc/passwd
RUN chmod 600 ~/.vnc/passwd
RUN touch ~/.Xauthority
CMD ["start-vncserver.sh"]

View File

@@ -0,0 +1,29 @@
FROM wxpython4/build:ubuntu-18.04
USER root:root
RUN apt-get install -y \
libx11-6 libxcb1 libxau6 xterm \
tightvncserver \
xvfb dbus-x11 x11-utils \
xfonts-base xfonts-75dpi xfonts-100dpi \
# Choose one of these:
# lxde
lubuntu-desktop
# ubuntu-mate-desktop
RUN apt-get remove -y "*screensaver*"
RUN apt-get clean
USER ${USER}:${USER}
RUN touch ~/.Xauthority; \
mkdir ~/.vnc; \
echo "password" | vncpasswd -f >> ~/.vnc/passwd; \
chmod 600 ~/.vnc/passwd; \
# And a coresponding one of these:
# echo "exec /usr/bin/startlxde" > ~/.vnc/xstartup;
echo "exec lxsession -e LXDE -s Lubuntu" > ~/.vnc/xstartup;
# echo "exec mate-session" > ~/.vnc/xstartup;
RUN chmod +x ~/.vnc/xstartup;
CMD ["start-vncserver.sh"]

View File

@@ -1,44 +1,45 @@
#!/bin/bash
#--------------------------------------------------------------------------
# This script is run in the Vagrant VMs and performs the actual build of
# Phoenix. It expects to find a source tarball in ../../dist, (which is
# mapped to ~/dist in the VM) and to be given a name on the command-line to
# be used to distinguish this build from the other linux builds.
# This script is run inside the Docker containers to perform the actual build
# of Phoenix. It expects to find a source tarball in a host folder (such as
# $PHOENIX_DIR/dist) which is mapped to `/dist` in the container. This can be
# accomplished by passing an arg like this to docker when running the build:
#
# docker -v $PWD/../dist:/dist ...
#
# The results of the build will be copied to a `linux` subfolder in the same
# location.
#--------------------------------------------------------------------------
set -o errexit
NAME=$1
if [ "$NAME" == "" ]; then
echo "ERROR: Build name must be given on the command line."
exit 1
fi
# This is the name of the virtual environment to be built. They should all be
# named like Py27, Py35, etc. If "all" is given then all the environments in
# ~/venvs will be used for a build.
PYENV=$2
PYENV=$1
if [ "$PYENV" == "" ]; then
PYENV=all
fi
# Either "gtk2", "gtk3" or "all"
PORT=$3
PORT=$2
if [ "$PORT" == "" ]; then
PORT=all
fi
TARBALL=$(ls ~/dist/wxPython-*.tar.gz)
TARBALL=$(ls /dist/wxPython-*.tar.gz)
if [ "$TARBALL" == "" ]; then
echo "ERROR: Source tarball not found."
exit 1
fi
if [ $PYENV != all -a ! -d ~/venvs/$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 virtual environment to be used, a tag (gtk2 or gtk3) to be
# It is given the Python virtualenv to be used, a tag (gtk2 or gtk3) to be
# used to help name the target folder, and an optional flag (--gtk3) to be
# passed on the build.py command line.
function do_build {
@@ -46,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
@@ -72,8 +78,7 @@ 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/$NAME
DEST=/dist/linux/$TAG/$DIST_NAME
mkdir -p $DEST
mv dist/*.whl $DEST
@@ -84,16 +89,13 @@ function do_build {
}
# Do a build for each Python virtual environment in ~/venvs
for VENV in ~/venvs/*; do
if [ $PYENV = all -o $PYENV = $(basename $VENV) ]; then
# build a package for GTK2?
if [ $PORT = all -o $PORT = gtk2 ]; then
do_build $VENV gtk2 --gtk2
fi
# build a package for GTK3?
if [ $PORT = all -o $PORT = gtk3 ]; then
do_build $VENV gtk3 --gtk3

16
docker/scripts/hello.sh Executable file
View File

@@ -0,0 +1,16 @@
#!/bin/bash
echo "Hello World, from wxPython's build container on $DIST_NAME"
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
if [ -e /etc/redhat-release ]; then
cat /etc/redhat-release
fi
echo ""

View File

@@ -0,0 +1,3 @@
#!/bin/bash
echo "starting VNC server ..."
vncserver :1 -geometry 1600x1050 -depth 24 && tail -F ~/.vnc/*.log

132
docker/tasks.py Normal file
View File

@@ -0,0 +1,132 @@
#!/usr/bin/env python
#----------------------------------------------------------------------
# Name: tasks.py
# Purpose: Invoke-based set of commands for dealing with wxPython's
# Docker files, images and performing wxPython builds.
#
# Author: Robin Dunn
#
# Created: 1-July-2019
# Copyright: (c) 2019 by Total Control Software
# License: wxWindows License
#----------------------------------------------------------------------
import os
import glob
from invoke import task, run
HERE = os.path.abspath(os.path.dirname(__file__))
@task(
aliases=['build_image', 'bi'],
help={
'image': 'Name of a docker image to build. May be specified more than once. Defaults to all.',
'gui': 'Build the gui version of an image instead of just the build image.',
},
iterable=['image'],
)
def build_images(ctx, image, gui=False):
"""
Build docker image(s).
"""
if image == []:
image = _get_all_distros(gui)
os.chdir(HERE)
dist=os.path.abspath('../dist')
img_type = 'gui' if gui else 'build'
for img_name in image:
# build it
ctx.run('docker build --no-cache '
'-f {type}/{name}/Dockerfile '
'-t wxpython4/{type}:{name} .'.format(name=img_name, type=img_type),
pty=True, echo=True)
# test it
ctx.run('docker run -it --rm -v {}:/dist '
'wxpython4/{}:{} hello.sh'.format(dist, img_type, img_name),
pty=True, echo=True)
@task(
help={
'image': 'Name of a docker image to push. May be specified more than once. Defaults to all.',
'gui': 'Push the gui version of an image instead of just the build image.',
},
iterable=['image'],
)
def push(ctx, image, gui=False):
"""
Push one or more images to docker hub. User should have already run
a `docker login` command.
"""
if image == []:
image = _get_all_distros(gui)
os.chdir(HERE)
img_type = 'gui' if gui else 'build'
for img_name in image:
# build it
ctx.run(
'docker push wxpython4/{type}:{name}'.format(name=img_name, type=img_type),
pty=True, echo=True)
@task(
aliases=['build_wxp', 'bwxp'],
help={
'image':'Name of a docker image to use for building. May be specified more than once. Defaults to all.',
'port': 'One of gtk2, gtk3 or all. Defaults to all.',
'venv': 'The name of a Python virtual environment to use for the build, like Py27, Py36, etc. Defaults to all.'
},
iterable=['image'],
)
def build_wxpython(ctx, image, venv='all', port='all'):
"""
Use docker images to build wxPython.
This command requires that there is a wxPython source archive in the ../dist
folder, such as one produced by `python build.py sdist` or one from a
release or snapshot build of wxPython.
"""
if image == []:
image = _get_all_distros()
os.chdir(HERE)
dist=os.path.abspath('../dist')
for img_name in image:
ctx.run('docker run -it --rm -v {}:/dist '
'wxpython4/build:{} do-build.sh {} {}'.format(dist, img_name, venv, port),
pty=True, echo=True)
@task(
help={
'image_tag':"The tag of the image to be run",
'cmd': "If given will run this command instead of the image's default command.",
'gui': "If given will run the 'gui' image insead of the 'build' image.",
'port': "Host port to use for the VNC connection.",
'keep': "Keep the container when it exits. Otherwise it will be auto-removed."
},
positional=['image_tag'],
)
def run(ctx, image_tag, cmd=None, gui=False, port=5901, keep=False):
"""
Run a wxpython docker image.
"""
os.chdir(HERE)
dist=os.path.abspath('../dist')
imgtype = 'gui' if gui else 'build'
cmd = '' if cmd is None else cmd
rm = '' if keep else '--rm'
ctx.run(
'docker run -it {} -v {}:/dist -p {}:5901 wxpython4/{}:{} {}'.format(
rm, dist, port, imgtype, image_tag, cmd),
pty=True, echo=True)
def _get_all_distros(gui):
os.chdir(HERE)
wildcard = os.path.join('gui' if gui else 'build', '*-*')
all_matching = glob.glob(wildcard)
return [os.path.basename(item) for item in all_matching]

View File

@@ -1,67 +0,0 @@
wxPython 4 builds on various Linux distros with Vagrant
=======================================================
Vagrant (https://www.vagrantup.com/) is a tool that enables creating and using
automated, relatively lightweight virtual environments. Vagrant and the
Vagrant community provide several base images that are essentially simplistic
bare-bones installs of various operating systems, that can be thought of as a
bare canvas ready for provisioning with the needs of whatever applications
they will be used for. The hosting platform can be Windows, Mac OSX, or Linux.
For wxPython, this means that we can automate the creation and provisioning of
virtual Linux machines with all the packages installed that are needed for
building wxPython 4. The each of the numbered subfolders located here contains
the Vagrant configuration and a bootstrap script for all of the Linux distros
that we currently support. As long as there is an existing vagrant "box"
available then adding support for new configurations is fairly simple.
Setup
-----
The following steps should be followed to set up a computer to be a Vagrant
host:
1. Install VirtualBox: https://www.virtualbox.org/wiki/Downloads
2. Install vagrant: https://www.vagrantup.com/downloads.html
3. Install the vagrant-vbguest plugin to keep the VirtualBox Guest Additions
package installed and up to date. See: https://github.com/dotless-de/vagrant-vbguest
and run::
vagrant plugin install vagrant-vbguest
Building
--------
The Vagrant VMs are provisioned to contain everything they need to build
Phoenix packages, except for two things: the source code and a build script to
do all the work. To make this a little simpler, the VMs are also configured to
share the ``{PhoenixRoot}/dist`` folder, and the
``{PhoenixRoot}/vagrant/scripts`` folder so they can access those two things
as well.
To perform a build there must be a Phoenix source tarball located in the
``{PhoenixRoot}/dist`` folder, which can either be generated with the
``build.py dox etg sip sdist`` command, or one of the source tarballs from a
release or the snapshots server can be used. With that file in place then a
build for a specific distro can be done with just a few vagrant commands, for
example::
cd vagrant/ubuntu-18.04
vagrant up
vagrant ssh -c "scripts/build.sh ubuntu-18.04"
vagrant halt
Please note that currently this will do up to 8 complete builds, one for each
supported version of Python on that distro, for both gtk2 and gtk3. Additional
parameters can be passed to the ``build.sh`` script to narrow the build down to
a specific Python version or port. See ``scripts/build.sh`` for details.
The wheel file(s) generated by the build will be placed in subfolders of
``{PhoenixRoot}/dist/linux``.

View File

@@ -1,28 +0,0 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
# Set which Vagrant "box" (base image) to use, and tell it how to set up the
# VM, packages to install, etc.
config.vm.box = "centos/7"
config.vm.provision :shell, path: "bootstrap.sh"
# Additional parameters for the VM
config.vm.provider "virtualbox" do |vb|
vb.memory = 4096
vb.cpus = 4
end
# Share the Phoenix/dist folder so the VM can get the source tarball and has
# a place to put the build results.
config.vm.synced_folder "../../dist", "/home/vagrant/dist"
# And share a folder with the build script
config.vm.synced_folder "../scripts", "/home/vagrant/scripts"
# set auto_update to false, if you do NOT want to check the correct
# additions version when booting this machine
config.vbguest.auto_update = false
end

View File

@@ -1,34 +0,0 @@
#!/bin/bash
# Set up and update package repos
yum -y install yum-utils
yum -y install https://centos7.iuscommunity.org/ius-release.rpm
yum -y update
# Install necessary development tools, libs, etc.
yum -y group install development
yum -y install gtk2 gtk2-devel gtk3 gtk3-devel \
webkitgtk webkitgtk-devel webkitgtk3 webkitgtk3-devel \
libjpeg-turbo-devel libpng-devel libtiff-devel \
SDL SDL-devel gstreamer gstreamer-devel gstreamer-plugins-base-devel \
freeglut freeglut-devel libnotify libnotify-devel libSM-devel \
libXtst-devel
# Install all available Python packages and their dev packages
yum -y install python python-tools python-devel python-virtualenv
yum -y install python34u python34u-tools python34u-devel
yum -y install python35u python35u-tools python35u-devel
yum -y install python36u python36u-tools python36u-devel
# Set up virtual environments for each Python where the Phoenix builds will be
# done. Set them to the vagrant user so the venvs can be updated by pip later.
mkdir venvs
virtualenv --python=python2.7 venvs/Py27
pyvenv-3.4 venvs/Py34
pyvenv-3.5 venvs/Py35
python3.6 -m venv venvs/Py36
chown -R vagrant:vagrant venvs

View File

@@ -1,28 +0,0 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
# Set which Vagrant "box" (base image) to use, and tell it how to set up the
# VM, packages to install, etc.
config.vm.box = "debian/jessie64"
config.vm.provision :shell, path: "bootstrap.sh"
# Additional parameters for the VM
config.vm.provider "virtualbox" do |vb|
vb.memory = 4096
vb.cpus = 4
end
# Share the Phoenix/dist folder so the VM can get the source tarball and has
# a place to put the build results.
config.vm.synced_folder "../../dist", "/home/vagrant/dist"
# And share a folder with the build script
config.vm.synced_folder "../scripts", "/home/vagrant/scripts"
# set auto_update to false, if you do NOT want to check the correct
# additions version when booting this machine
config.vbguest.auto_update = false
end

View File

@@ -1,29 +0,0 @@
#!/bin/bash
# Set up and update package repos
apt-get update
# Install necessary development tools, libs, etc.
apt-get install -y build-essential dpkg-dev
apt-get install -y libgtk2.0-dev libgtk-3-dev
apt-get install -y libjpeg-dev libtiff-dev \
libsdl1.2-dev libgstreamer-plugins-base0.10-dev \
libnotify-dev freeglut3 freeglut3-dev libsm-dev \
libwebkitgtk-dev libwebkitgtk-3.0-dev \
libxtst-dev
# Install all available Python packages and their dev packages
apt-get install -y python2.7 python2.7-dev libpython2.7-dev python-virtualenv
apt-get install -y python3.4 python3.4-dev libpython3.4-dev python3.4-venv
#apt-get install -y python3.5 python3.5-dev libpython3.5-dev python3.5-venv
# Set up virtual environments for each Python where the Phoenix builds will be
# done. set them to the vagrant user so the venv's can be updated by pip later.
mkdir venvs
virtualenv --python=python2.7 venvs/Py27
pyvenv-3.4 venvs/Py34
#pyvenv-3.5 venvs/Py35
chown -R vagrant:vagrant venvs

View File

@@ -1,28 +0,0 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
# Set which Vagrant "box" (base image) to use, and tell it how to set up the
# VM, packages to install, etc.
config.vm.box = "debian/stretch64"
config.vm.provision :shell, path: "bootstrap.sh"
# Additional parameters for the VM
config.vm.provider "virtualbox" do |vb|
vb.memory = 4096
vb.cpus = 4
end
# Share the Phoenix/dist folder so the VM can get the source tarball and has
# a place to put the build results.
config.vm.synced_folder "../../dist", "/home/vagrant/dist"
# And share a folder with the build script
config.vm.synced_folder "../scripts", "/home/vagrant/scripts"
# set auto_update to false, if you do NOT want to check the correct
# additions version when booting this machine
config.vbguest.auto_update = false
end

View File

@@ -1,27 +0,0 @@
#!/bin/bash
# Set up and update package repos
apt-get update
# Install necessary development tools, libs, etc.
apt-get install -y build-essential dpkg-dev
apt-get install -y libgtk2.0-dev libgtk-3-dev
apt-get install -y libjpeg-dev libtiff-dev \
libsdl1.2-dev libgstreamer-plugins-base1.0-dev \
libnotify-dev freeglut3 freeglut3-dev libsm-dev \
libwebkitgtk-dev libwebkitgtk-3.0-dev\
libxtst-dev
# Install all available Python packages and their dev packages
apt-get install -y python2.7 python2.7-dev libpython2.7-dev python-virtualenv
apt-get install -y python3.5 python3.5-dev libpython3.5-dev python3.5-venv
# Set up virtual environments for each Python where the Phoenix builds will be
# done. set them to the vagrant user so the venv's can be updated by pip later.
mkdir venvs
virtualenv --python=python2.7 venvs/Py27
pyvenv-3.5 venvs/Py35
chown -R vagrant:vagrant venvs

View File

@@ -1,28 +0,0 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
# Set which Vagrant "box" (base image) to use, and tell it how to set up the
# VM, packages to install, etc.
config.vm.box = "fedora/26-cloud-base"
config.vm.provision :shell, path: "bootstrap.sh"
# Additional parameters for the VM
config.vm.provider "virtualbox" do |vb|
vb.memory = 4096
vb.cpus = 4
end
# Share the Phoenix/dist folder so the VM can get the source tarball and has
# a place to put the build results.
config.vm.synced_folder "../../dist", "/home/vagrant/dist"
# And share a folder with the build script
config.vm.synced_folder "../scripts", "/home/vagrant/scripts"
# set auto_update to false, if you do NOT want to check the correct
# additions version when booting this machine
config.vbguest.auto_update = false
end

View File

@@ -1,31 +0,0 @@
#!/bin/bash
# Set up and update package repos
dnf -y update
dnf -y install yum-utils
# Install necessary development tools, libs, etc.
dnf -y group install "Development Tools"
dnf -y install gcc-c++
dnf -y install gtk2 gtk2-devel gtk3 gtk3-devel \
webkitgtk webkitgtk-devel webkitgtk3 webkitgtk3-devel \
libjpeg-turbo-devel libpng-devel libtiff-devel \
SDL SDL-devel gstreamer gstreamer-devel gstreamer-plugins-base-devel \
freeglut freeglut-devel libnotify libnotify-devel libSM-devel \
libXtst-devel
# Install all available Python packages and their dev packages
dnf -y install python python-tools python-devel python2-virtualenv
dnf -y install python3 python3-tools python3-devel
dnf -y install python35
# Set up virtual environments for each Python where the Phoenix builds will be
# done. Set them to the vagrant user so the venv's can be updated by pip later.
mkdir venvs
virtualenv --python=python2.7 venvs/Py27
python3.5 -m venv venvs/Py35
python3.6 -m venv venvs/Py36
chown -R vagrant:vagrant venvs

View File

@@ -1,28 +0,0 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
# Set which Vagrant "box" (base image) to use, and tell it how to set up the
# VM, packages to install, etc.
config.vm.box = "fedora/27-cloud-base"
config.vm.provision :shell, path: "bootstrap.sh"
# Additional parameters for the VM
config.vm.provider "virtualbox" do |vb|
vb.memory = 4096
vb.cpus = 4
end
# Share the Phoenix/dist folder so the VM can get the source tarball and has
# a place to put the build results.
config.vm.synced_folder "../../dist", "/home/vagrant/dist"
# And share a folder with the build script
config.vm.synced_folder "../scripts", "/home/vagrant/scripts"
# set auto_update to false, if you do NOT want to check the correct
# additions version when booting this machine
config.vbguest.auto_update = false
end

View File

@@ -1,31 +0,0 @@
#!/bin/bash
# Set up and update package repos
dnf -y update
dnf -y install yum-utils
# Install necessary development tools, libs, etc.
dnf -y group install "Development Tools"
dnf -y install gcc-c++
dnf -y install gtk2 gtk2-devel gtk3 gtk3-devel \
webkitgtk4 webkitgtk4-devel \
libjpeg-turbo-devel libpng-devel libtiff-devel \
SDL SDL-devel gstreamer gstreamer-devel gstreamer-plugins-base-devel \
freeglut freeglut-devel libnotify libnotify-devel libSM-devel \
libXtst-devel
# Install all available Python packages and their dev packages
dnf -y install python python-tools python-devel python2-virtualenv
dnf -y install python3 python3-tools python3-devel
dnf -y install python35
# Set up virtual environments for each Python where the Phoenix builds will be
# done. Set them to the vagrant user so the venv's can be updated by pip later.
mkdir venvs
virtualenv --python=python2.7 venvs/Py27
python3.5 -m venv venvs/Py35
python3.6 -m venv venvs/Py36
chown -R vagrant:vagrant venvs

View File

@@ -1,28 +0,0 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
# Set which Vagrant "box" (base image) to use, and tell it how to set up the
# VM, packages to install, etc.
config.vm.box = "fedora/28-cloud-base"
config.vm.provision :shell, path: "bootstrap.sh"
# Additional parameters for the VM
config.vm.provider "virtualbox" do |vb|
vb.memory = 4096
vb.cpus = 4
end
# Share the Phoenix/dist folder so the VM can get the source tarball and has
# a place to put the build results.
config.vm.synced_folder "../../dist", "/home/vagrant/dist"
# And share a folder with the build script
config.vm.synced_folder "../scripts", "/home/vagrant/scripts"
# set auto_update to false, if you do NOT want to check the correct
# additions version when booting this machine
config.vbguest.auto_update = false
end

View File

@@ -1,32 +0,0 @@
#!/bin/bash
# Set up and update package repos
dnf -y update
dnf -y install yum-utils
# Install necessary development tools, libs, etc.
dnf -y group install "Development Tools"
dnf -y install gcc-c++
dnf -y install gtk2 gtk2-devel gtk3 gtk3-devel \
webkitgtk4 webkitgtk4-devel \
libjpeg-turbo-devel libpng-devel libtiff-devel \
SDL SDL-devel gstreamer gstreamer-devel gstreamer-plugins-base-devel \
freeglut freeglut-devel libnotify libnotify-devel libSM-devel \
libXtst-devel
# Install all available Python packages and their dev packages
dnf -y install python python-tools python-devel python2-virtualenv
dnf -y install python3 python3-tools python3-devel
dnf -y install python37
# Set up virtual environments for each Python where the Phoenix builds will be
# done. Set them to the vagrant user so the venv's can be updated by pip later.
mkdir venvs
virtualenv --python=python2.7 venvs/Py27
python3.6 -m venv venvs/Py36
python3.7 -m venv venvs/Py37
chown -R vagrant:vagrant venvs

View File

@@ -1,28 +0,0 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
# Set which Vagrant "box" (base image) to use, and tell it how to set up the
# VM, packages to install, etc.
config.vm.box = "ubuntu/trusty64"
config.vm.provision :shell, path: "bootstrap.sh"
# Additional parameters for the VM
config.vm.provider "virtualbox" do |vb|
vb.memory = 4096
vb.cpus = 4
end
# Share the Phoenix/dist folder so the VM can get the source tarball and has
# a place to put the build results.
config.vm.synced_folder "../../dist", "/home/vagrant/dist"
# And share a folder with the build script
config.vm.synced_folder "../scripts", "/home/vagrant/scripts"
# set auto_update to false, if you do NOT want to check the correct
# additions version when booting this machine
config.vbguest.auto_update = false
end

View File

@@ -1,32 +0,0 @@
#!/bin/bash
# Set up and update package repos
add-apt-repository ppa:deadsnakes/ppa
apt-get update
# Install necessary development tools, libs, etc.
apt-get install -y build-essential dpkg-dev
apt-get install -y libgtk2.0-dev libgtk-3-dev
apt-get install -y libjpeg-dev libtiff-dev \
libsdl1.2-dev libgstreamer-plugins-base0.10-dev \
libnotify-dev freeglut3 freeglut3-dev libsm-dev \
libwebkitgtk-dev libwebkitgtk-3.0-dev libwebkit2gtk-3.0-dev \
libxtst-dev
# Install all available Python packages and their dev packages
apt-get install -y python2.7 python2.7-dev libpython2.7-dev python-virtualenv
apt-get install -y python3.4 python3.4-dev libpython3.4-dev python3.4-venv
apt-get install -y python3.5 python3.5-dev libpython3.5-dev python3.5-venv
apt-get install -y python3.6 python3.6-dev libpython3.6-dev python3.6-venv
# Set up virtual environments for each Python where the Phoenix builds will be
# done. set them to the vagrant user so the venv's can be updated by pip later.
mkdir venvs
virtualenv --python=python2.7 venvs/Py27
python3.4 -m venv venvs/Py34
python3.5 -m venv venvs/Py35
python3.6 -m venv venvs/Py36
chown -R vagrant:vagrant venvs

View File

@@ -1,28 +0,0 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
# Set which Vagrant "box" (base image) to use, and tell it how to set up the
# VM, packages to install, etc.
config.vm.box = "ubuntu/xenial64"
config.vm.provision :shell, path: "bootstrap.sh"
# Additional parameters for the VM
config.vm.provider "virtualbox" do |vb|
vb.memory = 4096
vb.cpus = 4
end
# Share the Phoenix/dist folder so the VM can get the source tarball and has
# a place to put the build results.
config.vm.synced_folder "../../dist", "/home/vagrant/dist"
# And share a folder with the build script
config.vm.synced_folder "../scripts", "/home/vagrant/scripts"
# set auto_update to false, if you do NOT want to check the correct
# additions version when booting this machine
config.vbguest.auto_update = false
end

View File

@@ -1,35 +0,0 @@
#!/bin/bash
# Set up and update package repos
add-apt-repository ppa:deadsnakes/ppa
apt-get update
# Install necessary development tools, libs, etc.
apt-get install -y build-essential dpkg-dev
apt-get install -y aptitude mc
apt-get install -y libgtk2.0-dev libgtk-3-dev
apt-get install -y libjpeg-dev libtiff-dev \
libsdl1.2-dev libgstreamer-plugins-base0.10-dev \
libgstreamer-plugins-base1.0-dev \
libnotify-dev freeglut3 freeglut3-dev libsm-dev \
libwebkitgtk-dev libwebkitgtk-3.0-dev libwebkit2gtk-4.0-dev \
libxtst-dev
# Install all available Python packages and their dev packages
apt-get install -y python2.7 python2.7-dev libpython2.7-dev python-virtualenv
apt-get install -y python3.5 python3.5-dev libpython3.5-dev python3.5-venv
apt-get install -y python3.6 python3.6-dev libpython3.6-dev python3.6-venv
apt-get install -y python3.7 python3.7-dev libpython3.7-dev python3.7-venv
# Set up virtual environments for each Python where the Phoenix builds will be
# done. set them to the vagrant user so the venv's can be updated by pip later.
mkdir venvs
virtualenv --python=python2.7 venvs/Py27
pyvenv-3.5 venvs/Py35
python3.6 -m venv venvs/Py36
python3.7 -m venv venvs/Py37
chown -R vagrant:vagrant venvs

View File

@@ -1,28 +0,0 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
# Set which Vagrant "box" (base image) to use, and tell it how to set up the
# VM, packages to install, etc.
config.vm.box = "ubuntu/bionic64"
config.vm.provision :shell, path: "bootstrap.sh"
# Additional parameters for the VM
config.vm.provider "virtualbox" do |vb|
vb.memory = 4096
vb.cpus = 4
end
# Share the Phoenix/dist folder so the VM can get the source tarball and has
# a place to put the build results.
config.vm.synced_folder "../../dist", "/home/vagrant/dist"
# And share a folder with the build script
config.vm.synced_folder "../scripts", "/home/vagrant/scripts"
# set auto_update to false, if you do NOT want to check the correct
# additions version when booting this machine
config.vbguest.auto_update = false
end

View File

@@ -1,31 +0,0 @@
#!/bin/bash
# Set up and update package repos
add-apt-repository ppa:deadsnakes/ppa
apt update
# Install necessary development tools, libs, etc.
apt install -y build-essential dpkg-dev
apt install -y aptitude mc
apt install -y libgtk2.0-dev libgtk-3-dev
apt install -y libjpeg-dev libtiff-dev \
libsdl1.2-dev libgstreamer-plugins-base1.0-dev \
libnotify-dev freeglut3 freeglut3-dev libsm-dev \
libwebkitgtk-dev libwebkitgtk-3.0-dev
# Install all available Python packages and their dev packages
apt install -y python2.7 python2.7-dev libpython2.7-dev python-virtualenv
apt install -y python3.6 python3.6-dev libpython3.6-dev python3.6-venv
apt install -y python3.7 python3.7-dev libpython3.7-dev python3.7-venv
# Set up virtual environments for each Python where the Phoenix builds will be
# done. set them to the vagrant user so the venv's can be updated by pip later.
mkdir venvs
virtualenv --python=python2.7 venvs/Py27
python3.6 -m venv venvs/Py36
python3.7 -m venv venvs/Py37
chown -R vagrant:vagrant venvs