aboutcode-org / aboutcode-org/scancode-toolkit

Parse pip cache dir

Aperta
#4,220 7 commenti 0 reazioni 0 assegnatari Vedi su GitHub
codeday easy good first issue new feature package-formats
Lingua principale
Python
Stelle
2.6k
Fork
791
Merge medio
1g 12h
PR unite (30g)
5

Descrizione

It can happen that we find a pip cache directory in a codebase. It contains both code archives and JSON that would be useful to parse and collect.
For instance:
```$ less .cache/pip/wheels/eb/60/37/ee40403cbd895ccdb57eb28b03b0afabeb449d5df9ce776a0d/origin.json
pombreda@computer4:~$ ll .cache/pip/wheels/eb/60/37/ee40403cbd895ccdb57eb28b03b0afabeb449d5df9ce776a0d/
total 80
drwxrwxr-x 2 pombreda pombreda 4096 Mar 11 17:12 ./
drwxrwxr-x 3 pombreda pombreda 4096 Mar 11 17:12 ../
-rw-rw-r-- 1 pombreda pombreda 332 Mar 11 17:12 origin.json
-rw-rw-r-- 1 pombreda pombreda 69427 Mar 11 17:12 pefile-2022.5.30-py3-none-any.whl

$ ll .cache/pip/wheels/eb/60/37/ee40403cbd895ccdb57eb28b03b0afabeb449d5df9ce776a0d/
total 80
drwxrwxr-x 2 foo bar 4096 Mar 11 17:12 ./
drwxrwxr-x 3 foo bar 4096 Mar 11 17:12 ../
-rw-rw-r-- 1 foo bar 332 Mar 11 17:12 origin.json
-rw-rw-r-- 1 foo bar 69427 Mar 11 17:12 pefile-2022.5.30-py3-none-any.whl

$ less .cache/pip/wheels/eb/60/37/ee40403cbd895ccdb57eb28b03b0afabeb449d5df9ce776a0d/origin.json

{"archive_info": {"hash": "sha256=a5488a3dd1fd021ce33f969780b88fe0f7eebb76eb20996d7318f307612a045b", "hashes": {"sha256": "a5488a3dd1fd021ce33f969780b88fe0f7eebb76eb20996d7318f307612a045b"}}, "url": "https://files.pythonhosted.org/packages/48/30/4559d06bad5bb627733dac1ef28c34f5e35f1461247ba63e5f6366901277/pefile-2022.5.30.tar.gz"}

```

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.