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``.



