Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
3d3916a
[pre-commit.ci] pre-commit autoupdate (#627)
pre-commit-ci[bot] Aug 4, 2024
78b9ea9
Updated Cirrus CI config to use FreeBSD 14
agronholm Aug 4, 2024
46c2389
chore: make sure local ruff runs don't touch vendored (#618)
henryiii Aug 4, 2024
0add7d6
Deprecated bdist_wheel and updated the README (#631)
agronholm Aug 4, 2024
7bb46d7
Created a new release
agronholm Aug 4, 2024
067534c
Skip abi3 tests when freethreading Python build is used (#637)
mgorny Oct 11, 2024
d841597
[pre-commit.ci] pre-commit autoupdate (#635)
pre-commit-ci[bot] Oct 11, 2024
9254a4f
Exclude `@overload` and `if TYPE_CHECKING:` from coverage checks
agronholm Oct 24, 2024
28c1ba1
Improved compatibility with future versions of `setuptools` (#638)
abravalheri Oct 25, 2024
baf6bf8
Removed Cirrus CI configuration
agronholm Nov 3, 2024
e9894e7
Tweaked pytest settings to make the tracebacks easier to read
agronholm Nov 7, 2024
e43464d
Adjusted target Python versions in GitHub CI
agronholm Nov 7, 2024
c81f5c9
Refactored the `wheel convert` command to not require setuptools (#640)
agronholm Nov 8, 2024
68387af
Only configure setuptools logging if bdist_wheel is imported (#641)
agronholm Nov 8, 2024
f064c69
Added license files for vendored `packaging`
agronholm Nov 8, 2024
d78f0e3
Created a new release
agronholm Nov 8, 2024
d343391
Fixed wrong wheel file names in converted pure-Python eggs/wininsts
agronholm Nov 23, 2024
7855525
Created a new release
agronholm Nov 23, 2024
426b8dd
Added the Python 3.13 classifier
agronholm Dec 12, 2024
edb5f7a
Check for empty description when converting metadata (#646)
intentionally-left-nil Jan 5, 2025
3028d38
Fixed test failures (#651)
shenxianpeng Mar 15, 2025
42ed975
Updated the short description
agronholm Dec 13, 2024
6427a57
Switched to SPDX license classifier
agronholm Mar 23, 2025
374c402
[pre-commit.ci] pre-commit autoupdate (#647)
pre-commit-ci[bot] Mar 26, 2025
a99cdd5
Refactored the codebase (#655)
agronholm Mar 28, 2025
1da6583
Created a new release
agronholm Apr 3, 2025
6edbbd6
[pre-commit.ci] pre-commit autoupdate (#661)
pre-commit-ci[bot] Apr 7, 2025
9861763
Restored the wheel.macosx_libfile module for setuptools
agronholm Apr 8, 2025
7a0ea7f
Created a new release
agronholm Apr 8, 2025
ed02488
Fix issue link in 0.46.1 release note (#665)
ziyao233 Apr 17, 2025
beef5cd
Restored the bdist_wheel command
agronholm Apr 21, 2025
c8f1f09
Emit FutureWarning instead of DeprecationWarning when bdist_wheel is …
agronholm Apr 21, 2025
f2e83fc
Fixed bdist_wheel import test
agronholm May 4, 2025
a352b89
Removed redundant Python version from the publish workflow (#666)
DimitriPapadopoulos May 4, 2025
fc8cb41
Revert "Removed redundant Python version from the publish workflow (#…
agronholm May 5, 2025
15b7577
PEP 639 compliance (#670)
DimitriPapadopoulos Jul 31, 2025
6244f08
Update pre-commit ruff legacy alias (#668)
DimitriPapadopoulos Sep 14, 2025
be9f45b
[pre-commit.ci] pre-commit autoupdate (#667)
pre-commit-ci[bot] Oct 6, 2025
0bac882
Update github actions environments (#673)
nikolas Dec 18, 2025
c1d442b
[pre-commit.ci] pre-commit autoupdate (#674)
pre-commit-ci[bot] Jan 6, 2026
41418fa
Fixed test failures due to metadata normalization changes
agronholm Jan 21, 2026
7a7d2de
Fixed security issue around wheel unpack (#675)
agronholm Jan 21, 2026
557fb54
Created a new release
agronholm Jan 21, 2026
eba4036
Updated the version number for v0.46.2
agronholm Jan 21, 2026
7445fb5
Fixed an import of a removed module
agronholm Jan 22, 2026
8b6fa74
Created a new release
agronholm Jan 22, 2026
ad932ee
Fix documentation: grammar, typos, formatting, and links (#678)
DimitriPapadopoulos Feb 8, 2026
bbbe3dc
Migrated to dependency groups
agronholm Feb 8, 2026
39039c0
Improved the index page
agronholm Feb 8, 2026
0ce509e
Added the wheel info subcommand (#669)
killerdevildog Feb 15, 2026
56223f6
`__package__` → `__spec__.parent` (#679)
DimitriPapadopoulos Feb 27, 2026
47674ba
chore: add check-sdist to checks (#681)
henryiii Mar 3, 2026
2975deb
Require tox >= 4.22
agronholm Mar 3, 2026
6258068
chore: log_level is better than log_cli_level (#684)
henryiii Apr 6, 2026
5718957
[pre-commit.ci] pre-commit autoupdate (#685)
pre-commit-ci[bot] Apr 22, 2026
d5a1763
fix(wheelfile): resolve .dist-info path case-insensitively when readi…
armorbreak001 Apr 22, 2026
bb69216
Reordered the changelog entries
agronholm Apr 22, 2026
efd83a7
Created a new release
agronholm Apr 22, 2026
197012d
Increased the upper bound for flit-core as a build requirement
agronholm May 10, 2026
33650c6
[pre-commit.ci] pre-commit autoupdate (#691)
pre-commit-ci[bot] Jul 14, 2026
4a63caf
Preserve compatible metadata versions in convert (#690)
itscloud0 Jul 18, 2026
0ca6f24
feat: add --local-version option to wheel pack (#694)
pctablet505 Jul 19, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions .cirrus.yml

This file was deleted.

27 changes: 11 additions & 16 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,43 +14,38 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "pypy-3.9", "pypy-3.10"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14", "pypy-3.11"]
include:
- os: macos-latest
python-version: "3.8"
python-version: "3.9"
- os: windows-latest
python-version: "3.8"
python-version: "3.9"
- os: macos-latest
python-version: "3.12"
python-version: "3.14"
- os: windows-latest
python-version: "3.12"
python-version: "3.14"
- os: macos-latest
python-version: "pypy-3.10"
python-version: "pypy-3.11"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
cache: pip
cache-dependency-path: pyproject.toml
- name: Install the project
run: pip install --no-binary=wheel .
- name: Install test dependencies
run: pip install .[test] coverage[toml]
- name: Include SDist check dependencies
if: matrix.python-version == '3.12'
run: pip install build flit
- name: Install the project and its test dependencies
run: pip install --group test coverage[toml] .
- name: Test with pytest
run: coverage run -m pytest -v
env:
PYTHONWARNDEFAULTENCODING: 1
- name: Generate coverage report
run: coverage xml
- name: Send coverage data to Codecov
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5
with:
file: coverage.xml
env:
Expand Down
20 changes: 13 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
exclude: ^src/wheel/vendored

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v6.0.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
Expand All @@ -14,18 +12,18 @@ repos:
- id: end-of-file-fixer
- id: mixed-line-ending
args: ["--fix=lf"]
- id: requirements-txt-fixer
- id: trailing-whitespace
exclude: "tests/commands/test_convert.py"

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.3
rev: v0.15.20
hooks:
- id: ruff
- id: ruff-check
args: [--fix, --show-fixes]
- id: ruff-format

- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
rev: v2.4.2
hooks:
- id: codespell

Expand All @@ -36,5 +34,13 @@ repos:
- id: rst-directive-colons
- id: rst-inline-touching-normal

- repo: https://github.com/henryiii/check-sdist
rev: v1.5.0
hooks:
- id: check-sdist
args: [--inject-junk]
additional_dependencies:
- flit-core

ci:
autoupdate_schedule: quarterly
2 changes: 1 addition & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ sphinx:
build:
os: ubuntu-22.04
tools:
python: "3.8"
python: "3.9"

python:
install:
Expand Down
23 changes: 14 additions & 9 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
wheel
=====

This library is the reference implementation of the Python wheel packaging
standard, as defined in `PEP 427`_.
This is a command line tool for manipulating Python wheel files, as defined in
`PEP 427`_. It contains the following functionality:

It has two different roles:
* Convert ``.egg`` archives into ``.whl``
* Unpack wheel archives
* Repack wheel archives
* Add or remove tags in existing wheel archives

#. A setuptools_ extension for building wheels that provides the
``bdist_wheel`` setuptools command
#. A command line tool for working with wheel files
.. _PEP 427: https://peps.python.org/pep-0427/

It should be noted that wheel is **not** intended to be used as a library, and
as such there is no stable, public API.
Historical note
---------------

This project used to contain the implementation of the setuptools_ ``bdist_wheel``
command, but as of setuptools v70.1, it no longer needs ``wheel`` installed for that to
work. Thus, you should install this **only** if you intend to use the ``wheel`` command
line tool!

.. _PEP 427: https://www.python.org/dev/peps/pep-0427/
.. _setuptools: https://pypi.org/project/setuptools/

Documentation
Expand Down
8 changes: 4 additions & 4 deletions docs/development.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Pull Requests
- Provide a good description of what you're doing and why.
- Provide tests that cover your changes and try to run the tests locally first.

**Example**. Assuming you set up GitHub account, forked wheel repository from
**Example**. Assuming you set up a GitHub account, forked the wheel repository from
https://github.com/pypa/wheel to your own page via web interface, and your
fork is located at https://github.com/yourname/wheel

Expand All @@ -23,7 +23,7 @@ fork is located at https://github.com/yourname/wheel
$ git commit

You may reference relevant issues in commit messages (like #1259) to
make GitHub link issues and commits together, and with phrase like
make GitHub link issues and commits together, and with a phrase like
"fixes #1259" you can even close relevant issues automatically. Now
push the changes to your fork::

Expand Down Expand Up @@ -54,7 +54,7 @@ To run the tests via tox against all matching interpreters::

To run the tests via tox against a specific environment::

$ tox -e py35
$ tox -e py39

Alternatively, you can run the tests via pytest using your default interpreter::

Expand Down Expand Up @@ -92,5 +92,5 @@ To make a new release:
#. Create a new git tag matching the version exactly
#. Push the new tag to GitHub

Pushing a new tag to GitHub will trigger the publish workflow which package the
Pushing a new tag to GitHub will trigger the publish workflow which will package the
project and publish the resulting artifacts to PyPI.
17 changes: 4 additions & 13 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,11 @@ wheel

`GitHub <https://github.com/pypa/wheel>`_ |
`PyPI <https://pypi.org/pypi/wheel/>`_ |
User IRC: #pypa |
Dev IRC: #pypa-dev
`PyPA Discord <https://discord.gg/python>`_

This library is the reference implementation of the Python wheel packaging
standard, as defined in `PEP 427`_.

It has two different roles:

#. A setuptools_ extension for building wheels that provides the
``bdist_wheel`` setuptools command
#. A command line tool for working with wheel files

.. _PEP 427: https://www.python.org/dev/peps/pep-0427/
.. _setuptools: https://pypi.org/project/setuptools/
.. include:: ../README.rst
:start-line: 3
:end-before: Documentation

.. toctree::
:maxdepth: 2
Expand Down
4 changes: 2 additions & 2 deletions docs/installing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ can typically find the wheel package under one of the following package names:
* python3-wheel

.. _pip: https://pip.pypa.io/en/stable/
.. _installation instructions: https://pip.pypa.io/en/stable/installing/
.. _installation instructions: https://pip.pypa.io/en/stable/installation/

Python and OS Compatibility
---------------------------

wheel should work on any Python implementation and operating system and is
compatible with Python version 3.7 and upwards.
compatible with Python version 3.9 and upwards.
5 changes: 4 additions & 1 deletion docs/manpages/wheel.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ Commands
``convert``
Convert egg or wininst to wheel

``info``
Show information about a wheel file

``tags``
Change the tags on a wheel file

Expand All @@ -43,4 +46,4 @@ Options
-h, --help show this help message and exit


.. _`PEP 427`: https://www.python.org/dev/peps/pep-0427/
.. _`PEP 427`: https://peps.python.org/pep-0427/
74 changes: 71 additions & 3 deletions docs/news.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,75 @@ Release Notes

**UNRELEASED**

- Canonicalize requirements in METADATA file (PR by Wim Jeantine-Glenn)
- Added a ``--local-version`` option to ``wheel pack`` to add, replace, or remove a
PEP 440 local version identifier from a wheel
(`#570 <https://github.com/pypa/wheel/issues/570>`_)
- Fixed ``wheel convert`` unnecessarily upgrading compatible core metadata versions
(`#643 <https://github.com/pypa/wheel/issues/643>`_)

**0.47.0 (2026-04-22)**

- Added the ``wheel info`` subcommand to display metadata about wheel files without
unpacking them (`#639 <https://github.com/pypa/wheel/issues/639>`_)
- Fixed ``WheelFile`` raising ``Missing RECORD file`` when the wheel filename contains
uppercase characters (e.g. ``Django-3.2.5.whl``) but the ``.dist-info`` directory
inside uses normalized lowercase naming
(`#411 <https://github.com/pypa/wheel/issues/411>`_)

**0.46.3 (2026-01-22)**

- Fixed ``ImportError: cannot import name '_setuptools_logging' from 'wheel'`` when
installed alongside an old version of setuptools and running the ``bdist_wheel``
command (`#676 <https://github.com/pypa/wheel/issues/676>`_)

**0.46.2 (2026-01-22)**

- Restored the ``bdist_wheel`` command for compatibility with ``setuptools`` older than
v70.1
- Importing ``wheel.bdist_wheel`` now emits a ``FutureWarning`` instead of a
``DeprecationWarning``
- Fixed ``wheel unpack`` potentially altering the permissions of files outside of the
destination tree with maliciously crafted wheels (CVE-2026-24049)

**0.46.1 (2025-04-08)**

- Temporarily restored the ``wheel.macosx_libfile`` module
(`#659 <https://github.com/pypa/wheel/issues/659>`_)

**0.46.0 (2025-04-03)**

- Dropped support for Python 3.8
- Removed the ``bdist_wheel`` setuptools command implementation and entry point.
The ``wheel.bdist_wheel`` module is now just an alias to
``setuptools.command.bdist_wheel``, emitting a deprecation warning on import.
- Removed vendored ``packaging`` in favor of a run-time dependency on it
- Made the ``wheel.metadata`` module private (with a deprecation warning if it's
imported
- Made the ``wheel.cli`` package private (no deprecation warning)
- Fixed an exception when calling the ``convert`` command with an empty description
field

**0.45.1 (2024-11-23)**

- Fixed pure Python wheels converted from eggs and wininst files having the ABI tag in
the file name

**0.45.0 (2024-11-08)**

- Refactored the ``convert`` command to not need setuptools to be installed
- Don't configure setuptools logging unless running ``bdist_wheel``
- Added a redirection from ``wheel.bdist_wheel.bdist_wheel`` to
``setuptools.command.bdist_wheel.bdist_wheel`` to improve compatibility with
``setuptools``' latest fixes.

Projects are still advised to migrate away from the deprecated module and import
the ``setuptools``' implementation explicitly. (PR by @abravalheri)

**0.44.0 (2024-08-04)**

- Canonicalized requirements in METADATA file (PR by Wim Jeantine-Glenn)
- Deprecated the ``bdist_wheel`` module, as the code was migrated to ``setuptools``
itself

**0.43.0 (2024-03-11)**

Expand Down Expand Up @@ -76,7 +144,7 @@ Release Notes
**0.38.1 (2022-11-04)**

- Removed install dependency on setuptools
- The future-proof fix in 0.36.0 for converting PyPy's SOABI into a abi tag was
- The future-proof fix in 0.36.0 for converting PyPy's SOABI into an ABI tag was
faulty. Fixed so that future changes in the SOABI will not change the tag.

**0.38.0 (2022-10-21)**
Expand Down Expand Up @@ -124,7 +192,7 @@ Release Notes
- Updated vendored ``packaging`` library to v20.7
- Switched to always using LF as line separator when generating ``WHEEL`` files
(on Windows, CRLF was being used instead)
- The ABI tag is taken from the sysconfig SOABI value. On PyPy the SOABI value
- The ABI tag is taken from the sysconfig SOABI value. On PyPy the SOABI value
is ``pypy37-pp73`` which is not compliant with PEP 3149, as it should have
both the API tag and the platform tag. This change future-proofs any change
in PyPy's SOABI tag to make sure only the ABI tag is used by wheel.
Expand Down
2 changes: 1 addition & 1 deletion docs/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ section to your ``setup.cfg``::
[bdist_wheel]
universal = 1

To convert an ``.egg`` or file to a wheel::
To convert an ``.egg`` file or directory to a wheel::

wheel convert youreggfile.egg

Expand Down
3 changes: 2 additions & 1 deletion docs/reference/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Reference Guide
:maxdepth: 2

wheel_convert
wheel_unpack
wheel_info
wheel_pack
wheel_tags
wheel_unpack
4 changes: 2 additions & 2 deletions docs/reference/wheel_convert.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ installers (``.exe``; made with ``bdist_wininst``) into wheels.

Egg names must match the standard format:

* ``<project>-<version>-pyX.Y`` for pure Python wheels
* ``<project>-<version>-pyX.Y-<arch>`` for binary wheels
* ``<project>-<version>-pyX.Y`` for pure Python eggs
* ``<project>-<version>-pyX.Y-<arch>`` for binary eggs


Options
Expand Down
Loading