Check Wheel Contents

0.6.3 · active · verified Thu Apr 16

check-wheel-contents is a command-line tool designed to validate the structure and contents of Python wheel (.whl) files, helping developers avoid common packaging mistakes before publishing. It analyzes wheels for issues like incorrect file placement, duplicate files, or inclusion of unwanted artifacts (`.pyc` files, `tests/` directories). Maintained actively, it currently supports Python 3.10 and newer.

Common errors

Warnings

Install

Quickstart

After building your Python wheel, typically using `python -m build --wheel` which places it in a `dist/` directory, run `check-wheel-contents` on the generated `.whl` file or the directory containing it. The tool will print 'OK' if all checks pass, or detailed error messages for any failures.

# Build your wheel first, typically into a 'dist/' directory
# python -m build --wheel

# Run check-wheel-contents on a single wheel file
check-wheel-contents dist/my_package-0.1.0-py3-none-any.whl

# Or check all wheels in a directory
check-wheel-contents dist/

view raw JSON →