Package: polysquare-travis-container
Polysquare Travis ContainerCreates a self-contained package-management installation, without root access.This allows you to install a pre-defined set of packages to a directory and
then execute commands using the packages installed in that directory.Supports Windows, OS X and Linux.On Windows and OS X, local versions of chocolatey and brew are installed
respectively, with packages installing to the specified folder. Commands
are executed with environment variables set such that the locally
installed packages will be used by any software built or installed
using thepsq-travis-container-execwrapper. Only the host architecture
is supported.On Linux,prootis used to "containerize" a downloaded
linux distribution, where the package manage operates only on the directory
in which the downloaded linux distribution exists. This allows you to
install packages usingapt-getoryumwithout touching other
system files.prootallow allows for different architectures to be
specified as well, which are emulated transparently using theqemu-user-modetool.For Linux, an alternative 'local' option is also provided which does not
incur the overhead ofprootbut is not as flexible. Sadly, on Travis-CI,prootno longer functions correctly and so the latter mode of operation
is required.StatusTravis CI (Ubuntu)AppVeyor (Windows)CoveragePyPILicenceCaveats64 bit executables cannot be emulated on a 32 bit architecture.Installationpolysquare-travis-containercan be installed using usingpipfrom PyPICreating a containerContainers can be created withpsq-travis-container-create:usage: psq-travis-container-create [-h] [--distro {Fedora,
                                                   Debian,
                                                   Ubuntu,
                                                   Windows,
                                                   OSX}]
                                   [--release RELEASE]
                                   [--arch {ppc,x86_64,x86,arm}]
                                   [--repositories REPOSITORIES]
                                   [--packages PACKAGES]
                                   CONTAINER_DIRECTORY

Create a Travis CI container If an arg is specified in more than one place,
then command-line values override environment variables which override
defaults.

positional arguments:
  CONTAINER_DIRECTORY   Directory to place container in

optional arguments:
  -h, --help            show this help message and exit
  --distro {Fedora,Debian,Ubuntu,Windows,OSX}
                        Distribution name to create container of
                        [env var: CONTAINER_DISTRO]
  --release RELEASE     Distribution release to create container of
                        [env var: CONTAINER_RELEASE]
  --arch {ppc,x86_64,x86,arm}
                        Architecture (all architectures other than the
                        system architecture will be emulated with qemu)
                        [env var: CONTAINER_ARCH]
  --repositories REPOSITORIES
                        A file containing a list of repositories to add
                        before installing packages.  Special keywords will
                        control the operation of this file: {release}: The
                        distribution release (eg, precise) {ubuntu}: Ubuntu
                        archive URL {launchpad}: Launchpad PPA URL header
                        (eg, http://ppa.launchpad.net)
  --packages PACKAGES   A file containing a list of packages to installThe distribution filesystem itself is placed in a subdirectory ofCONTAINER_DIRECTORY, so multiple distribution configurations can be placed in
a singleCONTAINER_DIRECTORY. A mini-distribution ofprootwill also be
placed inCONTAINER_DIRECTORY. This directory should be cached, for instance:cache:
  directories:
  - CONTAINER_DIRECTORYPackages will only be installed if the container is being created and not
restored from the cache. To install additional packages, the travis caches
should be deleted.Special directories like/tmpand/homeare linked automatically, so you
can run binaries or scripts directly from the project root.Using a containerTo run a command inside a container, usepsq-travis-container-exec:usage: psq-travis-container-exec [-h] [--distro {Fedora,
                                                 Debian,
                                                 Ubuntu,
                                                 Windows,
                                                 OSX}]
                                 [--release RELEASE]
                                 [--arch {ppc,x86_64,x86,arm}] --cmd
                                 [CMD [CMD ...]]
                                 CONTAINER_DIRECTORY

Use a Travis CI container If an arg is specified in more than one place,
then command-line values override environment variables which override
defaults.

positional arguments:
  CONTAINER_DIRECTORY   Directory to place container in

optional arguments:
  -h, --help            show this help message and exit
  --distro {Fedora,Debian,Ubuntu,Windows,OSX}
                        Distribution name to create container of
                        [env var: CONTAINER_DISTRO]
  --release RELEASE     Distribution release to create container of
                        [env var: CONTAINER_RELEASE]
  --arch {ppc,x86_64,x86,arm}
                        Architecture (all architectures other than the
                        system architecture will be emulated with qemu)
                        [env var: CONTAINER_ARCH]
  -- [CMD [CMD ...]]    Command to run inside of containerExecutables in CMD are resolved relative to the distribution container, so
runningbashwould runCONTAINER_DIR/bin/bashand not/bin/bashinside travis.The--container,--releaseand--archoptions are used to select a
pre-existing distribution container set up withpsq-travis-container-create.