• Stars
    star
    1,410
  • Rank 33,354 (Top 0.7 %)
  • Language
    Shell
  • License
    MIT License
  • Created almost 9 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Python wheels that work on any linux (almost)

manylinux

Older archives: https://groups.google.com/forum/#!forum/manylinux-discuss

The goal of the manylinux project is to provide a convenient way to distribute binary Python extensions as wheels on Linux. This effort has produced PEP 513 (manylinux1), PEP 571 (manylinux2010), PEP 599 (manylinux2014) and PEP 600 (manylinux_x_y).

PEP 513 defined manylinux1_x86_64 and manylinux1_i686 platform tags and the wheels were built on Centos5. Centos5 reached End of Life (EOL) on March 31st, 2017.

PEP 571 defined manylinux2010_x86_64 and manylinux2010_i686 platform tags and the wheels were built on Centos6. Centos6 reached End of Life (EOL) on November 30th, 2020.

PEP 599 defines the following platform tags:

  • manylinux2014_x86_64
  • manylinux2014_i686
  • manylinux2014_aarch64
  • manylinux2014_armv7l
  • manylinux2014_ppc64
  • manylinux2014_ppc64le
  • manylinux2014_s390x

Wheels are built on CentOS 7 which will reach End of Life (EOL) on June 30th, 2024.

PEP 600 has been designed to be "future-proof" and does not enforce specific symbols and a specific distro to build. It only states that a wheel tagged manylinux_x_y shall work on any distro based on glibc>=x.y. The manylinux project supports:

  • manylinux_2_24 images for x86_64, i686, aarch64, ppc64le and s390x.
  • manylinux_2_28 images for x86_64, aarch64, ppc64le and s390x.

Wheel packages compliant with those tags can be uploaded to PyPI (for instance with twine) and can be installed with pip:

manylinux tag Client-side pip version required CPython (sources) version embedding a compatible pip Distribution default pip compatibility
manylinux_x_y pip >= 20.3 3.8.10+, 3.9.5+, 3.10.0+ ALT Linux 10+, RHEL 9+, Debian 11+, Fedora 34+, Mageia 8+, Photon OS 3.0 with updates, Ubuntu 21.04+
manylinux2014 pip >= 19.3 3.7.8+, 3.8.4+, 3.9.0+ CentOS 7 rh-python38, CentOS 8 python38, Fedora 32+, Mageia 8+, openSUSE 15.3+, Photon OS 4.0+ (3.0+ with updates), Ubuntu 20.04+
manylinux2010 pip >= 19.0 3.7.3+, 3.8.0+ ALT Linux 9+, CentOS 7 rh-python38, CentOS 8 python38, Fedora 30+, Mageia 7+, openSUSE 15.3+, Photon OS 4.0+ (3.0+ with updates), Ubuntu 20.04+
manylinux1 pip >= 8.1.0 3.5.2+, 3.6.0+ ALT Linux 8+, Amazon Linux 1+, CentOS 7+, Debian 9+, Fedora 25+, openSUSE 15.2+, Mageia 7+, Photon OS 1.0+, Ubuntu 16.04+

The various manylinux tags allow projects to distribute wheels that are automatically installed (and work!) on the vast majority of desktop and server Linux distributions.

This repository hosts several manylinux-related things:

Docker images

Building manylinux-compatible wheels is not trivial; as a general rule, binaries built on one Linux distro will only work on other Linux distros that are the same age or newer. Therefore, if we want to make binaries that run on most Linux distros, we have to use an old enough distro.

Rather than forcing you to install an old distro yourself, install Python, etc., we provide Docker images where we've done the work for you. The images are uploaded to quay.io and are tagged for repeatable builds.

manylinux_2_28 (AlmaLinux 8 based)

Toolchain: GCC 12

  • x86_64 image: quay.io/pypa/manylinux_2_28_x86_64
  • aarch64 image: quay.io/pypa/manylinux_2_28_aarch64
  • ppc64le image: quay.io/pypa/manylinux_2_28_ppc64le
  • s390x image: quay.io/pypa/manylinux_2_28_s390x

manylinux2014 (CentOS 7 based)

Toolchain: GCC 10

  • x86_64 image: quay.io/pypa/manylinux2014_x86_64
  • i686 image: quay.io/pypa/manylinux2014_i686
  • aarch64 image: quay.io/pypa/manylinux2014_aarch64
  • ppc64le image: quay.io/pypa/manylinux2014_ppc64le
  • s390x image: quay.io/pypa/manylinux2014_s390x

manylinux_2_24 (Debian 9 based) - EOL

Support for manylinux_2_24 has ended on January 1st, 2023.

These images have some caveats mentioned in different issues.

Toolchain: GCC 6

  • x86_64 image: quay.io/pypa/manylinux_2_24_x86_64
  • i686 image: quay.io/pypa/manylinux_2_24_i686
  • aarch64 image: quay.io/pypa/manylinux_2_24_aarch64
  • ppc64le image: quay.io/pypa/manylinux_2_24_ppc64le
  • s390x image: quay.io/pypa/manylinux_2_24_s390x

manylinux2010 (CentOS 6 based - EOL)

Support for manylinux2010 has ended on August 1st, 2022.

Toolchain: GCC 8

  • x86-64 image: quay.io/pypa/manylinux2010_x86_64
  • i686 image: quay.io/pypa/manylinux2010_i686

manylinux1 (CentOS 5 based - EOL)

Code and details regarding manylinux1 can be found in the manylinux1 branch.

Support for manylinux1 has ended on January 1st, 2022.

Toolchain: GCC 4.8

  • x86-64 image: quay.io/pypa/manylinux1_x86_64
  • i686 image: quay.io/pypa/manylinux1_i686

All images are rebuilt using GitHub Actions / Travis-CI on every commit to this repository; see the docker/ directory for source code.

Image content

All images currently contain:

  • CPython 3.6, 3.7, 3.8, 3.9, 3.10, 3.11, 3.12 and PyPy 3.7, 3.8, 3.9 installed in /opt/python/<python tag>-<abi tag>. The directories are named after the PEP 425 tags for each environment -- e.g. /opt/python/cp37-cp37m contains a CPython 3.7 build, and can be used to produce wheels named like <pkg>-<version>-cp37-cp37m-<arch>.whl.
  • Development packages for all the libraries that PEP 571/599 list. One should not assume the presence of any other development package.
  • The auditwheel tool

Note that less common or virtually unheard of flag combinations (such as --with-pydebug (d) and --without-pymalloc (absence of m)) are not provided.

Note that starting with CPython 3.8, default sys.abiflags became an empty string: the m flag for pymalloc became useless (builds with and without pymalloc are ABI compatible) and so has been removed. (e.g. /opt/python/cp38-cp38)

Note that PyPy is not available on ppc64le & s390x.

Building Docker images

To build the Docker images, please run the following command from the current (root) directory:

$ PLATFORM=$(uname -m) POLICY=manylinux2014 COMMIT_SHA=latest ./build.sh

Please note that the Docker build is using buildx.

Updating the requirements

The requirement files are pinned and controlled by pip-tools compile. To update the pins, run nox on a Linux system with all supported versions of Python included. For example, using a docker image:

$ docker run --rm -v $PWD:/nox -t quay.io/pypa/manylinux2014_x86_64:latest pipx run nox -f /nox/noxfile.py -s update_python_dependencies update_python_tools

Updating the native dependencies

Native dependencies are all pinned in the Dockerfile. To update the pins, run the dedicated nox session. This will add a commit for each update. If you only want to see what would be updated, you can do a dry run:

$ nox -s update_native_dependencies [-- --dry-run]

Example

An example project which builds x86_64 wheels for each Python interpreter version can be found here: https://github.com/pypa/python-manylinux-demo. The repository also contains demo to build i686 and x86_64 wheels with manylinux1 tags.

This demonstrates how to use these docker images in conjunction with auditwheel to build manylinux-compatible wheels using the free travis ci continuous integration service.

(NB: for the i686 images running on a x86_64 host machine, it's necessary to run everything under the command line program linux32, which changes reported architecture in new program environment. See this example invocation)

The PEP itself

The official version of PEP 513 is stored in the PEP repository, but we also have our own copy here. This is where the PEP was originally written, so if for some reason you really want to see the full history of edits it went through, then this is the place to look.

The proposal to upgrade manylinux1 to manylinux2010 after Centos5 reached EOL was discussed in PEP 571.

The proposal to upgrade manylinux2010 to manylinux2014 was discussed in PEP 599.

The proposal for a "future-proof" manylinux_x_y definition was discussed in PEP 600.

This repo also has some analysis code that was used when putting together the original proposal in the policy-info/ directory.

If you want to read the full discussion that led to the original policy, then lots of that is here: https://groups.google.com/forum/#!forum/manylinux-discuss

The distutils-sig archives for January 2016 also contain several threads.

Code of Conduct

Everyone interacting in the manylinux project's codebases, issue trackers, chat rooms, and mailing lists is expected to follow the PSF Code of Conduct.

More Repositories

1

pipenv

Python Development Workflow for Humans.
Python
24,785
star
2

pipx

Install and Run Python Applications in Isolated Environments
Python
9,971
star
3

pip

The Python package installer
Python
9,448
star
4

hatch

Modern, extensible Python project management
Python
5,754
star
5

sampleproject

A sample project that exists for PyPUG's "Tutorial on Packaging and Distributing Projects"
Python
5,054
star
6

virtualenv

Virtual Python Environment builder
Python
4,770
star
7

pipfile

Python
3,232
star
8

setuptools

Official project repository for the Setuptools build system
Python
2,413
star
9

flit

Simplified packaging of Python modules
Python
2,143
star
10

cibuildwheel

🎡 Build Python wheels for all the platforms with minimal configuration.
Python
1,796
star
11

twine

Utilities for interacting with PyPI
Python
1,568
star
12

packaging.python.org

Python Packaging User Guide
Python
1,394
star
13

pip-audit

Audits Python environments, requirements files and dependency trees for known security vulnerabilities, and can automatically fix them
Python
951
star
14

gh-action-pypi-publish

The blessed :octocat: GitHub Action, for publishing your 📦 distribution files to PyPI: https://github.com/marketplace/actions/pypi-publish
Python
878
star
15

setuptools_scm

the blessed package to manage your versions by scm tags
Python
839
star
16

get-pip

Helper scripts to install pip, in a Python installation that doesn't have it.
Python
723
star
17

build

A simple, correct Python build frontend
Python
710
star
18

packaging

Core utilities for Python packages
Python
602
star
19

wheel

The official binary distribution format for Python
Python
494
star
20

bandersnatch

A PyPI mirror client according to PEP 381 http://www.python.org/dev/peps/pep-0381/
Python
439
star
21

auditwheel

Auditing and relabeling cross-distribution Linux wheels.
Python
425
star
22

advisory-database

Advisory database for Python packages published on pypi.org
250
star
23

python-manylinux-demo

Demo project for building Python wheels for Linux with Travis-CI
C
222
star
24

sample-namespace-packages

Tests against namespace packages
Python
175
star
25

readme_renderer

Safely render long_description/README files in Warehouse
Python
158
star
26

packaging-problems

An issue tracker for the problems in packaging
143
star
27

trove-classifiers

Canonical source for classifiers on PyPI.
Python
134
star
28

pyproject-hooks

A low-level library for calling build-backends in `pyproject.toml`-based project
Python
120
star
29

installer

A low-level library for installing from a Python wheel distribution.
Python
118
star
30

gh-action-pip-audit

A GitHub Action for pip-audit
Python
66
star
31

scripttest

Utilities to help with testing command line scripts
Python
60
star
32

distlib

A low-level library which implements some Python packaging standards (PEPs) and which could be used by third-party packaging tools to achieve interoperability.
Python
48
star
33

distutils

distutils as found in cpython
Python
44
star
34

.github

Community health files for the Python Packaging Authority
34
star
35

pyproject-metadata

PEP 621 metadata parsing
Python
30
star
36

pypa.io

Source code for the pypa.io website
Python
24
star
37

interoperability-peps

Development repo for evolution of PyPA interoperability standards (released versions are published as PEPs on python.org)
Python
22
star
38

integration-test

ensure core packaging tools work well with each other
17
star
39

pkg_resources

Abandoned extraction of pkg_resources. Official version found at /pypa/setuptools.
Python
16
star
40

get-virtualenv

13
star
41

history

history generates history/changelog files for a project
Python
7
star
42

easy_install

Python
7
star
43

wheel-builders

Companion repo for the [email protected] mailing list
7
star
44

browntruck

Python
6
star
45

pypa-docs-theme

Common base Sphinx theme for PyPA projects
Python
6
star
46

docker-python

5
star
47

copr

Package files for building PyPA packages in copr
4
star
48

pypa-bot

Source code behind @pypa-bot (eventually)
4
star
49

pep470

Python
4
star
50

pip-test-package

Used in pip's test suite
Python
4
star
51

bootstrap

Assets for bootstrap.pypa.io
Dockerfile
4
star
52

pypi-camo

Dockerfile
3
star
53

bot-test

1
star
54

rootbeer

Bootstrapping Python build backends for source-only environments.
1
star