aboutcode-org / aboutcode-org/scancode-toolkit
Improve package url derived from ABOUT files
- Langage dominant
- Python
- Étoiles
- 2.6k
- Forks
- 791
- Merge moyen
- 1 j 12 h
- PR mergées (30 j)
- 5
Description
### Description
> Please leave a brief description of the bug or feature request:
The output of a `scancode --package` scan on `ABOUT` files could be improved by using additional metadata the `ABOUT` file provides.
Scanning https://github.com/nexB/scancode-toolkit/blob/develop/src/scancode/interrupt-robotframework.ABOUT returns a generic `pkg:about/robotframework@3.0.2` instead of the fully qualified `pkg:pypi/robotframework@3.0.2`. The `download_url` could be used to detect that this is a package from PyPi.
Looking at https://github.com/nexB/scancode-toolkit/blob/e3ab9d730e9c0daba2a81a35db3d8f84582b7ca2/src/typecode/magic2.py.ABOUT produces `pkg:about/python-magic`, the `download_url` gives us all the information we need to fully qualify it as `pkg:pypi/python-magic@0.4.6`.
### How To Reproduce
> Tell us how to reproduce the issue.
```
mkdir test
curl https://raw.githubusercontent.com/nexB/scancode-toolkit/e3ab9d730e9c0daba2a81a35db3d8f84582b7ca2/src/typecode/magic2.py.ABOUT >> test/magic2.py.ABOUT
curl https://raw.githubusercontent.com/nexB/scancode-toolkit/develop/src/scancode/interrupt-robotframework.ABOUT >> test/interrupt-robotframework.ABOUT
scancode --json-pp - --package test/ | grep purl
```
Guide de contribution
Ouvrir le guide de contribution
Évaluation
Cette issue n'a pas encore été évaluée.