Registry / devops / auditwheel

auditwheel

JSON →
library6.8.1pypypi✓ verified 23d ago

auditwheel is a command-line tool designed to facilitate the creation of Python wheel packages for Linux (containing pre-compiled binary extensions). These wheels are made compatible with a wide variety of Linux distributions by adhering to PEP 600 `manylinux_x_y`, PEP 513 `manylinux1`, PEP 571 `manylinux2010`, and PEP 599 `manylinux2014` platform tags. It helps to audit wheels for external shared library dependencies and then bundles them into the wheel, modifying RPATH entries for runtime compatibility. The library is currently at version 6.6.0 and maintains an active release cadence, frequently adding support for new manylinux policies and Python versions.

pip install auditwheel
INSTALL
IMPORT
SIG · AUDITWHEEL
A
auditwheel
devopspythonv6.8.1
Install
1.8s avg
Import
Disk
19MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v6.8.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 20.8MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.8s · import 0.000s · 21MB
19MB installed
● package 19MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

auditwheel
auditwheel <subcommand> [options] <wheelfile>
auditwheel is primarily a command-line utility; direct Python imports of its core functionality are not common for end-users. Its primary interface is through shell commands like `auditwheel show` and `auditwheel repair`.

This example demonstrates the typical command-line usage of `auditwheel`. First, it creates a dummy wheel file (in a real scenario, this would be a wheel containing compiled C/C++ extensions). Then, it uses `auditwheel show` to inspect the wheel's dependencies and ABI compliance. Finally, `auditwheel repair` is used to bundle any non-compliant shared libraries into the wheel and update its platform tag to a `manylinux` tag, outputting the repaired wheel to a specified directory. This process is usually executed within a `manylinux` Docker container to ensure a consistent build environment compatible with older Linux distributions.

#!/bin/bash # This quickstart demonstrates auditwheel's primary command-line usage. # In a real scenario, you would typically build a wheel containing compiled extensions # and then use auditwheel within a manylinux Docker environment. # 1. Create a dummy wheel file for demonstration purposes. # Replace 'my_package-1.0-py310-none-any.whl' with your actual wheel. # For a real test, ensure this wheel has compiled native extensions. mkdir -p dist echo "Dummy content" > dist/my_package-1.0-py310-none-linux_x86_64.whl echo "\n--- Inspecting the wheel with 'auditwheel show' ---" auditwheel show dist/my_package-1.0-py310-none-linux_x86_64.whl echo "\n--- Repairing the wheel with 'auditwheel repair' ---" mkdir -p repaired_wheels auditwheel repair dist/my_package-1.0-py310-none-linux_x86_64.whl -w repaired_wheels echo "\n--- Listing repaired wheels ---" ls repaired_wheels # Clean up dummy files rm -rf dist repaired_wheels
auditwheel --version
Debug
Known issues
breakingPython 3.7, 3.8, and 3.9 support has been successively dropped in recent major/minor versions. auditwheel 6.0.0 dropped Python 3.7, 6.2.0 dropped Python 3.8, and 6.5.0 dropped Python 3.9.
fix
Ensure your build environment uses Python 3.10 or newer. Check `requires_python` in the PyPI metadata for the exact minimum version.
affects: >=6.0.0, >=6.2.0, >=6.5.0
breakingThe `addtag` subcommand was removed in version 6.0.0.
fix
The functionality of `addtag` is now integrated into `auditwheel repair` or handled automatically. Refer to the official documentation for updated wheel tagging procedures.
affects: >=6.0.0
gotchaauditwheel primarily processes dependencies specified via `DT_NEEDED` (like `ldd`). It cannot statically detect or repair shared libraries that are dynamically loaded at runtime using mechanisms like `ctypes`, `cffi`, or `dlopen` from C/C++ code.
fix
Manually ensure that dynamically loaded libraries are available in the target environment or bundled through other means if they are not system-provided.
affects: All
gotchaauditwheel is a Linux-specific tool and does not operate on wheels built for other operating systems. For macOS, the `delocate` tool is typically used, and for Windows, `delvewheel` or `repairwheel` are alternatives.
fix
Use platform-specific tools for wheel repair on macOS (`delocate`) and Windows (`delvewheel`, `repairwheel`).
affects: All
gotchaauditwheel requires the `patchelf` utility to be installed and available in the system's PATH. This is an external operating system dependency, not a Python package.
fix
Install `patchelf` via your system's package manager (e.g., `apt install patchelf`, `yum install patchelf`, `brew install patchelf`). Ensure it's version 0.14 or newer.
affects: All
Upgrade
Version history
6.8.1latest on PyPI · released Aug 15, 2026
Audit
Dependencies
pythonrequiredRequires Python 3.10 or newer.
pyelftoolsrequiredRuntime dependency for ELF file parsing.
packagingrequiredRuntime dependency for handling Python packaging metadata.
patchelfrequiredExternal system utility required for modifying ELF binaries. Must be installed separately on the host system.
Agent activity
22 hits · last 30 days
node
18
Amazon
1
OpenAI (training)
1
Resources
auditwheel — pip install auditwheel · libregistry