Skip to content

Add parser for pip wheel cache origin.json files - #5486

Open
sujalgiriiitp-source wants to merge 1 commit into
aboutcode-org:developfrom
sujalgiriiitp-source:pip-cache-origin-json-4220-fix
Open

sujalgiriiitp-source wants to merge 1 commit into
aboutcode-org:developfrom
sujalgiriiitp-source:pip-cache-origin-json-4220-fix

Conversation

@sujalgiriiitp-source

Copy link
Copy Markdown

Detect and parse origin.json files from pip wheel cache directories (e.g. .cache/pip/wheels//) and collect package metadata: name and version from the download URL or a sibling wheel file name, the download URL itself, and the SHA256 from archive_info.

Only wheel-cache origin.json files are handled. The pip HTTP cache (~/.cache/pip/http/) uses binary msgpack files and is out of scope.

Missing fields are handled defensively: a missing URL falls back to a sibling wheel file name, a missing hash yields a package without a checksum, and invalid JSON yields no package instead of failing the scan.

This supersedes #5485, which had an incorrect DCO sign-off email and a stale plugins_list fixture. This PR fixes both: the sign-off now matches the commit author, and the new handler is included in the plugins_list fixture.

Fixes #4220
Signed-off-by: Sujal Giri sujalgiriiitp@gmail.com

Detect and parse origin.json files from pip wheel cache directories
(e.g. .cache/pip/wheels/<hash>/) and collect package metadata: name and
version from the download URL or a sibling wheel file name, the download
URL itself, and the SHA256 from archive_info.

Only wheel-cache origin.json files are handled. The pip HTTP cache
(~/.cache/pip/http/) uses binary msgpack files and is out of scope.

Missing fields are handled defensively: a missing URL falls back to a
sibling wheel file name, a missing hash yields a package without a
checksum, and invalid JSON yields no package instead of failing the scan.

Fixes aboutcode-org#4220

Signed-off-by: Sujal Giri <sujalgiriiitp@gmail.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Parse pip cache dir

1 participant