{"id":4439,"library":"auditwheel","title":"auditwheel","description":"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.","status":"active","version":"6.6.0","language":"en","source_language":"en","source_url":"https://github.com/pypa/auditwheel","tags":["linux","wheels","packaging","manylinux","binary","cli","build-tools"],"install":[{"cmd":"pip install auditwheel","lang":"bash","label":"Install stable version"}],"dependencies":[{"reason":"Requires Python 3.10 or newer.","package":"python","version":">=3.10"},{"reason":"Runtime dependency for ELF file parsing.","package":"pyelftools","optional":false},{"reason":"Runtime dependency for handling Python packaging metadata.","package":"packaging","optional":false},{"reason":"External system utility required for modifying ELF binaries. Must be installed separately on the host system.","package":"patchelf","optional":false}],"imports":[{"note":"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`.","symbol":"auditwheel","correct":"auditwheel <subcommand> [options] <wheelfile>"}],"quickstart":{"code":"#!/bin/bash\n\n# This quickstart demonstrates auditwheel's primary command-line usage.\n# In a real scenario, you would typically build a wheel containing compiled extensions\n# and then use auditwheel within a manylinux Docker environment.\n\n# 1. Create a dummy wheel file for demonstration purposes.\n#    Replace 'my_package-1.0-py310-none-any.whl' with your actual wheel.\n#    For a real test, ensure this wheel has compiled native extensions.\nmkdir -p dist\necho \"Dummy content\" > dist/my_package-1.0-py310-none-linux_x86_64.whl\n\necho \"\\n--- Inspecting the wheel with 'auditwheel show' ---\"\nauditwheel show dist/my_package-1.0-py310-none-linux_x86_64.whl\n\necho \"\\n--- Repairing the wheel with 'auditwheel repair' ---\"\nmkdir -p repaired_wheels\nauditwheel repair dist/my_package-1.0-py310-none-linux_x86_64.whl -w repaired_wheels\n\necho \"\\n--- Listing repaired wheels ---\"\nls repaired_wheels\n\n# Clean up dummy files\nrm -rf dist repaired_wheels\n","lang":"bash","description":"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."},"warnings":[{"fix":"Ensure your build environment uses Python 3.10 or newer. Check `requires_python` in the PyPI metadata for the exact minimum version.","message":"Python 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.","severity":"breaking","affected_versions":">=6.0.0, >=6.2.0, >=6.5.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.","message":"The `addtag` subcommand was removed in version 6.0.0.","severity":"breaking","affected_versions":">=6.0.0"},{"fix":"Manually ensure that dynamically loaded libraries are available in the target environment or bundled through other means if they are not system-provided.","message":"auditwheel 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.","severity":"gotcha","affected_versions":"All"},{"fix":"Use platform-specific tools for wheel repair on macOS (`delocate`) and Windows (`delvewheel`, `repairwheel`).","message":"auditwheel 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.","severity":"gotcha","affected_versions":"All"},{"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.","message":"auditwheel 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.","severity":"gotcha","affected_versions":"All"}],"env_vars":null,"last_verified":"2026-04-12T00:00:00.000Z","next_check":"2026-07-11T00:00:00.000Z"}