aboutcode-org / aboutcode-org/scancode-toolkit
Improve package url derived from ABOUT files
- 主要语言
- Python
- 星标
- 2.6k
- 派生
- 791
- 平均合并
- 1 天 12 小时
- 30 天内合并 PR
- 5
描述
### 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
```
贡献指南
评估
这个 Issue 还没有评估数据。