Demo project for building Python wheels for Linux with Travis-CI
Switch branches/tags
Nothing to show
Clone or download
rmcgibbo Merge pull request #11 from alex/patch-1
shell best practice: fully quote every variable
Latest commit a615d78 Dec 18, 2016
Type Name Latest commit message Commit time
Failed to load latest commit information.
pymanylinuxdemo Add .travis.yml Jan 24, 2016
travis shell best practice: fully quote every variable Dec 17, 2016
.gitignore Initial commit Jan 24, 2016
.travis.yml Update .travis.yml Feb 1, 2016
LICENSE Add LICENSE Jan 24, 2016 Add license waver Sep 6, 2016
dev-requirements.txt Add .travis.yml Jan 24, 2016 Fix typo Apr 19, 2016


Demo project for building Python wheels for Linux with Travis-CI

Build Status

This is an example of how to use Travis-CI to build PEP 513-compatible manylinux1 wheels for Python. It supports both Python 2 and 3 on 32 and 64 bit linux architectures.

Because these wheels need to be compiled on CentOS 5, this example uses Docker running on Travis-CI to compile (you don't need to use docker at all to use these wheels, it's just to compile them). The docker-based build environment images are:

  • 64-bit image (x86-64): Docker Repository on Quay
  • 32-bit image (i686): Docker Repository on Quay

This sample project contains a very simple C compile extension module that links to an external library (ATLAS, a linear algebra library). The build is configured via the file.

Continuous integration setup with Travis + Docker

The .travis.yml file in this repository sets up the build environment. The resulting build logs can be found at

The .travis.yml file instructs Travis to run the script travis/ inside of the 32-bit and 64-bit manylinux1 docker build environments. This script builds the package using pip. But these wheels link against an external library. So to create self-contained wheels, the build script runs the wheels through auditwheel, which copies the external library into the wheel itself, so that users won't need to install any extra non-PyPI dependencies.

Code of Conduct

Everyone interacting in the python-manylinux-demo project's codebases, issue trackers, chat rooms, and mailing lists is expected to follow the PyPA Code of Conduct.


To the extent possible under law, Robert T. McGibbon has waived all copyright and related or neighboring rights to python-manylinux-demo. This work is published from: United States of America.