Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/niess/extract-manylinux


https://github.com/niess/extract-manylinux

Last synced: 22 days ago
JSON representation

Awesome Lists containing this project

README

        

# 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](https://github.com/NixOS/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](examples/download.py) script. Alternatively, using
`docker` one can produce a tarball of an image, for instance as

```bash
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](extract_manylinux/extract.py#L50) 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](examples/extract.py) script for an
example of usage.

## Result

Resulting RCPRs are available from the
[releases](https://github.com/niess/extract-manylinux/releases/tag/rolling)
section.