/extract-manylinux

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

Extract CPython runtimes from a Manylinux image

This project is an example illustrating how one could produce a Relocatable CPython Runtime (RCPR) from a Manylinux Docker image.

Tip

The method used herein seems to be cross-plateform. That is, a functional aarch64 RCPR was produced from an x86_64 system.

Requirements

  • Patchelf, which is looked for under extract_manylinux/bin/ (or alternativelly under $HOME/.local/bin). Note that we used version 0.14.3 during our tests.

Usage

  • Manylinux image(s) must first be exported to a local folder, for instance using the download.py script. Alternatively, using docker one can produce a tarball of an image, for instance as

    docker export $(docker create quay.io/pypa/manylinux2014_aarch64) \
      --output="2014_aarch64.tar"

    The tarball should then be extracted to a local folder (images/2014/aarch64 during our tests).

  • The Extractor class let us produce a RCPR from the extracted Manylinux image (providing a valid tag within the images, e.g. cp311-cp311). See, the extract.py script for an example of usage.

Result

Resulting RCPRs are available from the releases section.