Skip to content

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

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

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

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.

Fixes #4220

Signed-off-by: Sujal Giri sujalgiri5@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 <sujalgiri5@gmail.com>
@sujalgiriiitp-source

Copy link
Copy Markdown
Author

Closing in favor of #5486, which supersedes this PR with a corrected DCO sign-off (matching the commit author) and the updated plugins_list fixture. The origin.json parser change and Fixes #4220 are carried over there.

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