Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

wheelmonger

Vendor shared libraries into Python wheels using a custom TOML policy, producing linux_<arch> platform wheels.

wheelmonger wraps auditwheel and gives you explicit control over which shared libraries are vendored into the wheel, which are assumed to be system-provided, and which are cross-wheel dependencies that should be left untouched.

Installation

pip install wheelmonger

Requires Python 3.12+ and a glibc-based Linux system.

Quick start

1. Write a policy file

Create a policy.toml that classifies your wheel's shared library dependencies into three lists:

[policy]
vendor = [
    "libzmq.so.*",
    "libqhull_r.so.*",
]

skip = [
    "libtorch.so",
    "libtorch_cpu.so",
]

system = [
    "libcrypto.so.*",
    "libssl.so.*",
    "libcurl.so.*",
]
  • vendor -- libraries to copy into the wheel and rewrite ELF references.
  • skip -- cross-wheel dependencies to leave untouched (e.g. PyTorch).
  • system -- libraries assumed present on the target system.

Patterns use fnmatch-style globbing. Libraries on the manylinux allow list (e.g. libc.so.6, libm.so.6) are always treated as system-provided automatically.

2. Inspect dependencies

wheelmonger show my_package-1.0-cp314-cp314-linux_x86_64.whl -p policy.toml

3. Repair the wheel

wheelmonger repair my_package-1.0-cp314-cp314-linux_x86_64.whl -p policy.toml

The repaired wheel is written to wheelhouse/ by default. A CycloneDX SBOM (wheelmonger.cdx.json) is generated automatically for vendored libraries and stored in the wheel's .dist-info/sboms/ directory.

Usage

wheelmonger repair WHEEL -p POLICY [-w WHEEL_DIR] [-L LIB_SDIR] [--strip] [-v]
wheelmonger show WHEEL -p POLICY [-v]

repair

Option Description
-p, --policy Path to the TOML policy file (or $WHEELMONGER_POLICY)
-w, --wheel-dir Output directory (default: wheelhouse/)
-L, --lib-sdir Subdirectory for vendored libs (default: .libs)
--strip Strip symbols from vendored libraries
--add-vendor PATTERN Additional library pattern to vendor (repeatable; or $WHEELMONGER_VENDOR_LIBS)
-z, --zip-compression-level Zip compression level (default: zlib default)
-v, --verbose Increase verbosity (repeatable)

show

Displays all shared library dependencies grouped by classification (vendor, manylinux, system, skip, unknown) without modifying the wheel.

Environment variables

Variable Description
WHEELMONGER_POLICY Default path to the TOML policy file. Overridden by -p/--policy.
WHEELMONGER_VENDOR_LIBS Additional vendor patterns separated by os.pathsep.

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wheelmonger-0.1.0a1.tar.gz (40.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wheelmonger-0.1.0a1-py3-none-any.whl (13.8 kB view details)

Uploaded Python 3

File details

Details for the file wheelmonger-0.1.0a1.tar.gz.

File metadata

  • Download URL: wheelmonger-0.1.0a1.tar.gz
  • Upload date:
  • Size: 40.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for wheelmonger-0.1.0a1.tar.gz
Algorithm Hash digest
SHA256 4810b242651194ce19ec953a311f90388249734968f84bf0ae6106db23ae70f9
MD5 63304f9b30d72321629e521765f298a7
BLAKE2b-256 9ff16c4e87aa36f5e8a172877c4c46240ebfa29f7b331ee5d80033ee8a71b2ee

See more details on using hashes here.

Provenance

The following attestation bundles were made for wheelmonger-0.1.0a1.tar.gz:

Publisher: release.yml on tiran/wheelmonger

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file wheelmonger-0.1.0a1-py3-none-any.whl.

File metadata

  • Download URL: wheelmonger-0.1.0a1-py3-none-any.whl
  • Upload date:
  • Size: 13.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for wheelmonger-0.1.0a1-py3-none-any.whl
Algorithm Hash digest
SHA256 a5611e9bd434ff1633ce8a04859c5acf84b994323531f97da9b4252470a0e454
MD5 6cd100b6d96c6061cfa8124e522b53f4
BLAKE2b-256 c577463507a5cd1f919d5e505238edf619059a041ddb15d61d9df9b2adbb56d1

See more details on using hashes here.

Provenance

The following attestation bundles were made for wheelmonger-0.1.0a1-py3-none-any.whl:

Publisher: release.yml on tiran/wheelmonger

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page