Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: pypa/python-manylinux-demo
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: pypy/pypy-manylinux-demo
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Can’t automatically merge. Don’t worry, you can still create the pull request.
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on May 17, 2019

  1. use the manylinux-pypy image instead of the official manylinux image.…

    … Wheels for pypy will be built out of the box, because travis/build_wheels.sh build the package for every python installation found under /opt/python
    antocuni committed May 17, 2019
    Copy the full SHA
    c4cc557 View commit details
  2. Copy the full SHA
    05b8f64 View commit details
Showing with 30 additions and 70 deletions.
  1. +1 −1 .travis.yml
  2. +29 −69 README.md
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@ matrix:
- sudo: required
services:
- docker
env: DOCKER_IMAGE=quay.io/pypa/manylinux2010_x86_64
env: DOCKER_IMAGE=pypywheels/manylinux2010-pypy_x86_64
PLAT=manylinux2010_x86_64

install:
98 changes: 29 additions & 69 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,70 +1,30 @@
python-manylinux-demo
pypy-manylinux-demo
=====================
Demo project for building Python wheels for Linux with Travis-CI

[![Build Status](https://travis-ci.org/pypa/python-manylinux-demo.svg?branch=master)](https://travis-ci.org/pypa/python-manylinux-demo)


This is an example of how to use Travis-CI to build
[PEP 513](https://www.python.org/dev/peps/pep-0513/)-compatible
wheels for Python. It supports

- manylinux1 for both Python 2 and 3 on 32 and 64 bit linux architectures.
- manylinux2010 for Python 2 and 3 on 64 bit linux architectures.

Because these wheels need to be compiled with a specific toolchain and support
libraries , 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 for manylinux1 (x86-64): ``quay.io/pypa/manylinux1_x86_64`` [![Docker Repository on Quay](https://quay.io/repository/pypa/manylinux1_x86_64/status "Docker Repository on Quay")](https://quay.io/repository/pypa/manylinux1_x86_64)
- 32-bit image for manylinux1 (i686): ``quay.io/pypa/manylinux1_i686`` [![Docker Repository on Quay](https://quay.io/repository/pypa/manylinux1_i686/status "Docker Repository on Quay")](https://quay.io/repository/pypa/manylinux1_i686)
- 64-bit image for manylinux2010 (x86-64): ``quay.io/pypa/manylinux2010_x86_64`` [![Docker Repository on Quay](https://quay.io/repository/pypa/manylinux2010_x86_64/status "Docker Repository on Quay")](https://quay.io/repository/pypa/manylinux2010_x86_64)

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

https://travis-ci.org/pypa/python-manylinux-demo

The `.travis.yml` file instructs Travis to run the script
`travis/build-wheels.sh` inside of the various 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`](https://pypi.python.org/pypi/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](https://www.pypa.io/en/latest/code-of-conduct/).

License
-------

<p xmlns:dct="http://purl.org/dc/terms/" xmlns:vcard="http://www.w3.org/2001/vcard-rdf/3.0#">
<a rel="license"
href="https://creativecommons.org/publicdomain/zero/1.0/">
<img src="https://i.creativecommons.org/p/zero/1.0/88x31.png" style="border-style: none;" alt="CC0" />
</a>
<br />
To the extent possible under law,
<a rel="dct:publisher"
href="https://github.com/rmcgibbo">
<span property="dct:title">Robert T. McGibbon</span></a>
has waived all copyright and related or neighboring rights to
<span property="dct:title">python-manylinux-demo</span>.
This work is published from:
<span property="vcard:Country" datatype="dct:ISO3166"
content="US" about="https://github.com/pypa/python-manylinux-demo">
United States of America</span>.
</p>
Demo project for building Python+PyPy wheels for Linux with Travis-CI

[![Build Status](https://travis-ci.org/pypy/pypy-manylinux-demo.svg?branch=master)](https://travis-ci.org/pypy/pypy-manylinux-demo)

This is a fork of the official
[python-manylinux-demo](https://github.com/pypa/python-manylinux-demo)
project. Building PyPy wheels is as easy as changing the docker image to use, as shown by this [commit](https://github.com/pypy/pypy-manylinux-demo/commit/c4cc5570f32fff90e60ed4701ef6b755ef3922fc).

```diff
diff --git a/.travis.yml b/.travis.yml
index 51e4a73..990950e 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -17,7 +17,7 @@ matrix:
- sudo: required
services:
- docker
- env: DOCKER_IMAGE=quay.io/pypa/manylinux2010_x86_64
+ env: DOCKER_IMAGE=pypywheels/manylinux2010-pypy_x86_64
PLAT=manylinux2010_x86_64
```

This works because the default script builds a wheel for every python
installation found in `/opt/python`, which now includes also PyPy.

If your build system is more elaborate or you want to build wheels for only
selected versions of CPython/PyPy, you probably need to tweak your scripts and
build wheels using e.g. `/opt/python/pp271-pypy_41/bin/python`.