Introduction
A .whl file, a wheel, is a built package for
Python. Installing it means little more than
unpacking it into the right folder, with nothing to compile, so most packages on the
Python Package Index (PyPI) are published as wheels. A package with compiled extension
modules publishes a separate wheel for each Python version, operating system and
processor it supports; a pure-Python package needs only one.
The file name says which systems a wheel is for:
name-version-pythontag-abitag-platformtag.whl, such as
numpy-2.1.0-cp312-cp312-win_amd64.whl for CPython 3.12 on 64-bit Windows,
or requests-2.32.3-py3-none-any.whl for any Python 3.
Structure
A wheel is a ZIP archive. The package’s files sit
at the top, laid out as they will be installed. Beside them is a
name-version.dist-info folder holding METADATA (the name,
version, summary and dependencies, in email-header style), WHEEL (the
wheel format version and the tool that built it), RECORD (every file in the
wheel with its SHA-256 hash and size) and, when the package installs commands,
entry_points.txt.
requests-2.32.3-py3-none-any.whl
├── requests/
│ ├── __init__.py
│ └── …
└── requests-2.32.3.dist-info/
├── METADATA
├── WHEEL
├── RECORD
└── top_level.txt
Links
Software
Developers
Reference
- Binary distribution format, Python Packaging User Guide