Install
consolepip install wheeldeps
Use
consolewheeldeps *.whl # what is missing
wheeldeps *.whl --json # machine readable
wheeldeps *.whl --python-version 3.10 # evaluate markers for another Python
wheeldeps *.whl --platform win32 # ... and another platform
wheeldeps *.whl --closure mypackage # what mypackage pulls from this set
pythonfrom wheeldeps import external_requirements, read_wheels
wheels = read_wheels(["app-1.0-py3-none-any.whl", "lib-2.0-py3-none-any.whl"])
for requirement in external_requirements(wheels):
print(requirement.name, requirement.specifier, requirement.marker)
What it does properly
- Name normalisation —
Zope.Interface,zope_interfaceandzope-interfaceare
the same project (PEP 503), so a provided wheel is recognised however it is spelled.
- Environment markers —
sys_platform == "win32",python_version >= "3.9",
extra == "socks", and/or/not, parentheses, in / not in. Version comparisons are numeric, so "3.12" > "3.9" behaves (a string compare gets it wrong). Point it at another interpreter with --python-version / --platform.
- Closure —
--closure NAMEwalks the requirement graph inside the set, so you can
see which wheels one package really drags in.
- No extraction — the METADATA member is read straight out of the zip, so a wheel
cannot write anything to disk while being inspected.
What it does not do
- It does not download, resolve version conflicts, or choose between candidates: it
answers "does this set satisfy these requirements", using names only.
- Specifiers are reported, not enforced (an installed
requests 1.0still counts as
providing requests>=2). Check the versions with pip check if that matters.
- Extras are parsed and kept, but a requirement on
requests[socks]is treated as a
requirement on requests, which is what a bundle needs.
Development
consolepython -m venv .venv
.venv/bin/pip install -e ".[test]"
.venv/bin/pytest
The suite covers every line of the package (pytest --cov --cov-branch), and the examples in the docstrings run as tests through --doctest-modules.
License
MIT.
Other libraries here
One problem each, standard library only, no runtime dependencies.
- argrepair — turn a bad tool call into a message the model can act on
- backoff-headers — turn a rate-limit header into the exact time to wait
- columncheck — find the CSV defect before the pipeline does
- dir-digest — one hash for a directory tree, identical on every OS
- docanchor — catch every broken heading anchor in your docs
- envfile-diff — diff two .env files without printing the secrets
- fsync-replace — replace a file so a crash cannot leave it half-written
- header-date — HTTP dates parsed strictly, formatted correctly
- junit-merge — merge JUnit XML from every job into one honest report
- npm-semver — npm semver ranges, parsed the way npm parses them
- outputcap — keep a huge tool result out of the context window
- parse-size — byte sizes in and out, MB and MiB never confused
- path-containment — keep untrusted paths inside their directory
- redactscope — stop secrets in tool results before they reach the model
- runbudget — a per-run cost cap that warns before it stops
- testflakes — rank your flaky tests from the history you already have
- tool-loop-guard — catch an agent repeating itself while it is still cheap
- toolcall-ledger — a hash-chained record of every tool call
- toolcircuit — stop retrying a tool that is down
- toolquota — client-side rate limits your agent loop can wait on
- zip-deterministic — byte-identical archives, build after build