auditwheel

6.6.0 · active · verified Sun Apr 12

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.

Warnings

Install

Imports

Quickstart

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

view raw JSON →