Skip to content
Waqas Bhatti edited this page Apr 12, 2019 · 3 revisions

Building manylinux2010

The new manylinux2010 docker image is now available: https://github.com/pypa/manylinux/issues/179

The steps below are the same, but per that thread, auditwheel makes wheels tagged as manylinux1 but are actually manylinux2010:

(py35) [root@6eb4e8ce48fb pyeebls]# auditwheel show /io/pyeebls-0.1.6-cp35-cp35m-manylinux1_x86_64.whl

pyeebls-0.1.6-cp35-cp35m-manylinux1_x86_64.whl is consistent with the
following platform tag: "manylinux2010_x86_64".

The wheel references external versioned symbols in these system-
provided shared libraries: libgcc_s.so.1 with versions {'GCC_3.3',
'GCC_4.2.0', 'GCC_3.0', 'GCC_4.3.0'}, libquadmath-2d0c479f.so.0.0.0
with versions {'QUADMATH_1.0'}, libc.so.6 with versions {'GLIBC_2.3',
'GLIBC_2.7', 'GLIBC_2.4', 'GLIBC_2.10', 'GLIBC_2.6', 'GLIBC_2.2.5',
'GLIBC_2.3.4'}, libm.so.6 with versions {'GLIBC_2.2.5'},
libgfortran-2e0d59d6.so.5.0.0 with versions {'GFORTRAN_8'}

This constrains the platform tag to "manylinux2010_x86_64". In order
to achieve a more compatible tag, you would need to recompile a new
wheel from source on a system with earlier versions of these
libraries, such as a recent manylinux image.

To get around this, as in https://github.com/pypa/manylinux/issues/179#issuecomment-482094910, use:

(py35) [root@6eb4e8ce48fb pyeebls]# auditwheel repair --plat manylinux2010_x86_64 -w /io /io/pyeebls-0.1.6-cp35-cp35m-linux_x86_64.whl
INFO:auditwheel.main_repair:Repairing pyeebls-0.1.6-cp35-cp35m-linux_x86_64.whl
INFO:auditwheel.wheeltools:Previous filename tags: linux_x86_64
INFO:auditwheel.wheeltools:New filename tags: manylinux2010_x86_64
INFO:auditwheel.wheeltools:Previous WHEEL info tags: cp35-cp35m-linux_x86_64
INFO:auditwheel.wheeltools:New WHEEL info tags: cp35-cp35m-manylinux2010_x86_64
INFO:auditwheel.main_repair:
Fixed-up wheel written to /io/pyeebls-0.1.6-cp35-cp35m-manylinux2010_x86_64.whl

Everything else appears as usual.

Building manylinux1 wheels

This write-up is mostly so I don't forget again how to make Linux manylinux1 wheels for pyeebls. Building MacOS and Windows wheels is still annoyingly complicated, so I'll need to figure out how I did that the last time.

$ docker pull quay.io/pypa/manylinux1_x86_64
$ cd /path/to/pyeebls-repo
$ mkdir wheelhouse
$ cd wheelhouse
$ docker run -it -v $(pwd):/io <manylinux1 image hash> /bin/bash

Once inside the container, install the dependencies:

$ yum install python-devel numpy atlas-devel gcc gcc-gfortan

# all of the Pythons live in /opt/python/
# create a virtualenv with the one you want - in this case Py37
$ /opt/python/cp37-cp37m/bin/python3 -m venv /work
$ git clone https://github.com/waqasbhatti/pyeebls 
$ source /work/bin/activate
$ pip install pip setuptools auditwheel -U 
$ pip install numpy

Build the manylinux1 wheel for the Python you want:

$ cd pyeebls/
$ pip wheel -w /io .
$ auditwheel repair -w /io /io/pyeebls-0.1.6-cp37-cp37m-linux_x86_64.whl

Check if it works by making a new virtualenv and installing the pyeebls wheel directly from the wheel using pip. Another good test is to docker pull python3.7-slim and mount the wheelhouse directory there, and then do a pip install from the wheel there. If everything works as expected, it should install correctly with no compiling needed and import fine.

Clone this wiki locally