Skip to main content
Polysquare Travis Container
===========================

Creates 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 the `psq-travis-container-exec` wrapper. Only the host architecture
is supported.

On Linux, [`proot`](http://proot.me) is 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 using `apt-get` or `yum` without touching other
system files. `proot` allow allows for different architectures to be
specified as well, which are emulated transparently using the
`qemu-user-mode` tool.

Status
------

| Travis CI (Ubuntu) | AppVeyor (Windows) | Coverage | PyPI | Licence |
|--------------------|--------------------|----------|------|---------|
|[![Travis](https://img.shields.io/travis/polysquare/polysquare-travis-container.svg)](http://travis-ci.org/polysquare/polysquare-travis-container)|[![AppVeyor](https://img.shields.io/appveyor/ci/smspillaz/polysquare-travis-container-vd3yj.svg)](https://ci.appveyor.com/project/smspillaz/polysquare-travis-container-vd3yj)|[![Coveralls](https://img.shields.io/coveralls/polysquare/polysquare-travis-container.svg)](http://coveralls.io/polysquare/polysquare-travis-container)|[![PyPIVersion](https://img.shields.io/pypi/v/polysquare-travis-container.svg)](https://pypi.python.org/pypi/polysquare-travis-container)[![PyPIPythons](https://img.shields.io/pypi/pyversions/polysquare-travis-container.svg)](https://pypi.python.org/pypi/polysquare-travis-container)|[![License](https://img.shields.io/github/license/polysquare/polysquare-travis-container.svg)](http://github.com/polysquare/polysquare-travis-container)|

Caveats
-------

64 bit executables cannot be emulated on a 32 bit architecture.

Installation
------------

`polysquare-travis-container` can be installed using using `pip` from PyPI

Creating a container
--------------------

Containers can be created with `psq-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 install

The distribution filesystem itself is placed in a subdirectory of
`CONTAINER_DIRECTORY`, so multiple distribution configurations can be placed in
a single `CONTAINER_DIRECTORY`. A mini-distribution of `proot` will also be
placed in `CONTAINER_DIRECTORY`. This directory should be cached, for instance:

cache:
directories:
- CONTAINER_DIRECTORY

Packages 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 `/tmp` and `/home` are linked automatically, so you
can run binaries or scripts directly from the project root.

Using a container
-----------------

To run a command inside a container, use `psq-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 container

Executables in CMD are resolved relative to the distribution container, so
running `bash` would run `CONTAINER_DIR/bin/bash` and not `/bin/bash`
inside travis.

The `--container`, `--release` and `--arch` options are used to select a
pre-existing distribution container set up with `psq-travis-container-create`.

Release files for polysquare-travis-container 0.0.24

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for polysquare-travis-container 0.0.24
File Size Uploaded
polysquare-travis-container-0.0.24.tar.gz 29.2 kB Details

Release files / polysquare-travis-container-0.0.24.tar.gz

Download URL polysquare-travis-container-0.0.24.tar.gz
Size 29.2 kB
Tags Source
SHA-256 checksum
How to use checksums
c053df6b9b0c98c53a0bc836b1c2bd1bdccbb3bb0b4a30d723658c1f5525f1b2
BLAKE2b-256 checksum
How to use checksums
ee3f95ce50ebba6d4182dbe25912f8972da3b3d30a317e669ceb01d752b9d081
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

0.0.47

1 release file

0.0.45

1 release file

0.0.44

1 release file

0.0.43

1 release file

0.0.42

1 release file

0.0.41

1 release file

0.0.40

1 release file

0.0.39

1 release file

0.0.38

1 release file

0.0.37

1 release file

0.0.36

1 release file

0.0.35

1 release file

0.0.34

1 release file

0.0.33

1 release file

0.0.32

1 release file

0.0.31

1 release file

0.0.30

1 release file

0.0.29

1 release file

0.0.28

1 release file

0.0.27

1 release file

0.0.26

1 release file

0.0.25

1 release file

This release

0.0.24 This release

1 release file

0.0.23

1 release file

0.0.22

1 release file

0.0.21

1 release file

0.0.20

1 release file

0.0.19

1 release file

0.0.18

1 release file

0.0.17

1 release file

0.0.15

1 release file

0.0.14

1 release file

0.0.13

1 release file

0.0.12

1 release file

0.0.11

1 release file

0.0.10

1 release file

0.0.9

1 release file

0.0.8

1 release file

0.0.7

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page