internal/tools/: auditwheel-6.0.0 metadata and description

Homepage Simple index

Cross-distribution Linux wheels

author Robert T. McGibbon
  • Development Status :: 4 - Beta
  • Environment :: Console
  • Intended Audience :: Developers
  • License :: OSI Approved :: MIT License
  • Operating System :: POSIX :: Linux
  • Programming Language :: Python :: 3
  • Programming Language :: Python :: 3.8
  • Programming Language :: Python :: 3.9
  • Programming Language :: Python :: 3.10
  • Programming Language :: Python :: 3.11
  • Programming Language :: Python :: 3.12
  • Programming Language :: Python :: 3 :: Only
  • Topic :: Software Development
  • Topic :: Software Development :: Build Tools
  • Topic :: Software Development :: Libraries :: Python Modules
description_content_type text/x-rst
license MIT
provides_extras test
  • packaging >=20.9
  • pyelftools >=0.24
  • pytest-cov ; extra == 'coverage'
  • pytest >=3.4 ; extra == 'coverage'
  • jsonschema ; extra == 'coverage'
  • pypatchelf ; extra == 'coverage'
  • pretend ; extra == 'coverage'
  • docker ; extra == 'coverage'
  • pytest >=3.4 ; extra == 'develop'
  • jsonschema ; extra == 'develop'
  • pypatchelf ; extra == 'develop'
  • pretend ; extra == 'develop'
  • docker ; extra == 'develop'
  • pytest-cov ; extra == 'develop'
  • pytest >=3.4 ; extra == 'test'
  • jsonschema ; extra == 'test'
  • pypatchelf ; extra == 'test'
  • pretend ; extra == 'test'
  • docker ; extra == 'test'
requires_python >=3.8
File Tox results History
42 KB
Python Wheel

Auditing and relabeling of PEP 600 manylinux_x_y, PEP 513 manylinux1, PEP 571 manylinux2010 and PEP 599 manylinux2014 Linux wheels.


auditwheel is a command line tool to facilitate the creation of Python wheel packages for Linux (containing pre-compiled binary extensions) that are compatible with a wide variety of Linux distributions, consistent with the PEP 600 manylinux_x_y, PEP 513 manylinux1, PEP 571 manylinux2010 and PEP 599 manylinux2014 platform tags.

auditwheel show: shows external shared libraries that the wheel depends on (beyond the libraries included in the manylinux policies), and checks the extension modules for the use of versioned symbols that exceed the manylinux ABI.

auditwheel repair: copies these external shared libraries into the wheel itself, and automatically modifies the appropriate RPATH entries such that these libraries will be picked up at runtime. This accomplishes a similar result as if the libraries had been statically linked without requiring changes to the build system. Packagers are advised that bundling, like static linking, may implicate copyright concerns.


  • OS: Linux

  • Python: 3.8+

  • patchelf: 0.14+

Only systems that use ELF-based linkage are supported (this should be essentially every Linux).

In general, building manylinux1 wheels requires running on a CentOS5 machine, building manylinux2010 wheels requires running on a CentOS6 machine, and building manylinux2014 wheels requires running on a CentOS7 machine, so we recommend using the pre-built manylinux Docker images, e.g.

$ docker run -i -t -v `pwd`:/io /bin/bash


auditwheel can be installed using pip:

$ pip3 install auditwheel


Inspecting a wheel:

$ auditwheel show cffi-1.5.0-cp35-cp35m-linux_x86_64.whl

cffi-1.5.0-cp35-cp35m-linux_x86_64.whl is consistent with the
following platform tag: "linux_x86_64".

The wheel references the following external versioned symbols in
system-provided shared libraries: GLIBC_2.3.

The following external shared libraries are required by the wheel:
    "": "/lib64/",
    "": "/usr/lib64/",
    "": "/lib64/"

In order to achieve the tag platform tag "manylinux1_x86_64" the
following shared library dependencies will need to be eliminated:

Repairing a wheel.

$ auditwheel repair cffi-1.5.2-cp35-cp35m-linux_x86_64.whl
Repairing cffi-1.5.2-cp35-cp35m-linux_x86_64.whl
Grafting: /usr/lib64/
Setting RPATH: to "$ORIGIN/.libs_cffi_backend"
Previous filename tags: linux_x86_64
New filename tags: manylinux1_x86_64
Previous WHEEL info tags: cp35-cp35m-linux_x86_64
New WHEEL info tags: cp35-cp35m-manylinux1_x86_64

Fixed-up wheel written to /wheelhouse/cffi-1.5.2-cp35-cp35m-manylinux1_x86_64.whl


  1. auditwheel uses the DT_NEEDED information (like ldd) from the Python extension modules to determine which system libraries they depend on. Code that dynamically loads libraries at runtime using ctypes / cffi (from Python) or dlopen (from C/C++) doesn’t contain this information in a way that can be statically determined, so dependencies that are loaded via those mechanisms will be missed.

  2. There’s nothing we can do about “fixing” binaries if they were compiled and linked against a too-recent version of libc or libstdc++. These libraries (and some others) use symbol versioning for backward compatibility. In general, this means that code that was compiled against an old version of glibc will run fine on systems with a newer version of glibc, but code what was compiled on a new system won’t / might not run on older system.

    So, to compile widely-compatible binaries, you’re best off doing the build on an old Linux distribution, such as a manylinux Docker image.


The tests can be run with nox, which will automatically install test dependencies.

Some of the integration tests also require a running and accessible Docker daemon. These tests will pull a number of docker images if they are not already available on your system, but it won’t update existing images. To update these images manually, run:

docker pull python:3.8-slim
docker pull
docker pull
docker pull
docker pull

You may also remove these images using docker rmi.

Code of Conduct

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