70.5. python3-wheel-0.48.0
The reference implementation of the Python wheel format
| Version | 0.48.0, release 1 |
| Shelf | python — The python3 interpreter, tkinter, and Python build, packaging and extension tooling |
| Phase | 40_lang (Languages), 65 of 186 in build order |
| Licence | MIT |
| Homepage | https://github.com/pypa/wheel |
| Build time | 0.1 SBU |
| Installed size | 222.5 KiB in 39 files |
| Recipe | ports/core/python/python3-wheel/kpkgbuild |
About
The reference implementation of the Python wheel format: the wheel package and command, which unpack, repack, retag and inspect .whl files and convert eggs and Windows installers to wheels. It is a build dependency of many ports. qemu is one: its pythondeps.toml lists wheel in its tooling group of Python dependencies, beside qemu.qmp.
Sources
python3-wheel-0.48.0.tar.gz(64.9 KiB)
sha25694800765601e9171bf5d58d066e640662842bcedcbab982b2c90787a2c987322
upstream: https://files.pythonhosted.org/packages/source/w/wheel/wheel-0.48.0.tar.gz
archive copy: sources-3/python--python3-wheel-0.48.0.tar.gzpython3-wheel-vendor-0.48.0.tar.xz(358.5 KiB)
sha256f03768c312a93b6713fe596687928ae13b9722ffe9f3857065470c70728f64c3
a vendor bundle: the dependencies upstream’s own tool would download, packed once
archive copy: sources-3/python--python3-wheel-vendor-0.48.0.tar.xz
Dependencies
Depends on: python3, python3-setuptools, python3-pip, python3-packaging.
Required by (32): bcnc, calibre, chirp, cura, deluge, gnuhealth, gramps, onnxruntime, picard, python3-bcrypt, python3-debugpy, python3-defusedxml, python3-isodate, python3-kivy, python3-lsp-ruff, python3-lsp-server, python3-nest-asyncio, python3-owslib, python3-pillow-heif, python3-psycopg2, python3-pyicu, python3-scour, python3-shapely, python3-tornado, python3-uharfbuzz, qemu, qutebrowser, spyder, thrift, tryton, uranium, zim.
Installation
From the repository root, inside the build container, this is the line kdosbuild runs for the port:
script/chroot/exec.sh bash -c 'source script/phases/40_lang/phase.env && kpkg install python3-wheel'
What kpkg does
kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/python/python3-wheel.
1. Verify every declared source. Each file a sha256 = line names, found in the port directory or in /var/cache/kpkg/sources, must hash to its line; a mismatch stops the build before anything is unpacked.
cd /ports/core/python/python3-wheel
echo '94800765601e9171bf5d58d066e640662842bcedcbab982b2c90787a2c987322 python3-wheel-0.48.0.tar.gz' | sha256sum -c -
echo 'f03768c312a93b6713fe596687928ae13b9722ffe9f3857065470c70728f64c3 python3-wheel-vendor-0.48.0.tar.xz' | sha256sum -c -
2. Unpack. The work directory is emptied and the first source is unpacked into $SRC with its top directory stripped; any later tarball lands unstripped beside it in $SRC_ROOT, and a file that is not a tarball is copied into $SRC.
SRC_ROOT=/var/cache/kpkg/work/python3-wheel
SRC=$SRC_ROOT/python3-wheel-0.48.0
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf python3-wheel-0.48.0.tar.gz -C "$SRC" --strip-components=1
Every config.guess and config.sub older than automake’s is then replaced with automake’s, so a configure script recognises the musl target.
3. Build. build.sh is sourced in a subshell under set -e, from $SRC, with name, version, release and the five paths PKGNAME, PORT_SRC, SRC_ROOT, SRC and PKG set as shell variables. Its body, verbatim:
mkdir -p vendor
tar -xf $PORT_SRC/$name-vendor-$version.tar.xz --strip-components=1 -C vendor
python3 -m pip install . --ignore-installed --no-deps --find-links=vendor --no-index --root="$PKG" --prefix=/usr
The common switches of each build system are explained in the Flag glossary.
4. Package. kpkg removes libtool archives, the info directory index, mimeinfo.cache and every fonts.dir from $PKG, copies the source’s licence files into /usr/share/licenses/python3-wheel, prunes what the image does not ship, lints the tree and rolls it reproducibly:
tar --sort=name --format=gnu --numeric-owner --owner=0 --group=0 \
--mtime=@$SOURCE_DATE_EPOCH \
--use-compress-program='xz -9 -T0 --block-size=32MiB --no-adjust' \
-cf python3-wheel-0.48.0-1.tar.xz -C "$PKG" .
5. Adopt. kpkgadd installs the package’s files over the root, refusing a path another package owns, records the file list in /var/lib/kpkg/db/python3-wheel, and runs the triggers its paths call for.
Contents
Installed programs: wheel.
Installed directories: /usr/lib/python3.14/site-packages/wheel, /usr/lib/python3.14/site-packages/wheel-0.48.0.dist-info, /usr/share/licenses/python3-wheel.
Notes
The install runs with pip’s build isolation on. wheel builds with flit_core (requires = ["flit_core >=3.11,<5"]), and pip installs it into the temporary build environment from the vendor bundle (--no-index --find-links=vendor); flit_core needs nothing else to build itself. The bundle also carries packaging, wheel’s one run-time dependency, which neither the build environment nor the package takes from it: --no-deps leaves it out, and python3-packaging in depends provides it. Nothing from the bundle is installed into the package.