Version 3 (modified by bsoher, 4 months ago) (diff)


How To Build PyGamma Wheels for Linux

This document describes how to build PyGamma wheels for Linux.


Building wheels for Linux requires some care. Fortunately, the PSF has researched the topic and made suggestions on how to avoid some of the pitfalls. That's summarized in PEP 513.

NB. PEP 513 was updated to PEP 571

PEP 513 identifies CentOS 5.11 as the benchmark system on which a wheel should work for it to be broadly compatible. The easiest way to ensure that the PyGamma binaries run on CentOS 5.11 is to build them there.

If you don't already have a CentOS 5.11 virtual machine, now is the time to build one. There are instructions on how to set up a CentOS VM.

Build PyGamma

  1. Get the GAMMA source code onto your CentOS machine via SVN or any other way you like.
  2. cd gamma/platforms/Linux
  3. make pysgdist
  4. cd ../../pygamma
  5. python bdist_wheel

The last step creates the wheel file in the dist directory. As of this writing, the wheel package doesn't know about the manylinux1 standard described in PEP 513, so the wheel is inappropriately named. For instance, the wheel I created was named this --


I manually renamed it to this --


You might also need to rename the wheel you create.

Why CentOS 5.11? (Optional Reading)

CentOS is a Red Hat EL derivative, and Red Hat is a very conservative distro. CentOS 5.11 was released in September of 2014, which means it's an old-ish version of a conservative distro. That means the runtime libraries on that system are a least common denominator of just about any Linux system likely to be in use. If a binary can run there, it should run just about anywhere.