aboutcode-org / aboutcode-org/scancode-toolkit

Make scancode.api.get_licenses more widely useful by reducing dependencies

Offen
#5,115 2 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen
new feature
Vorherrschende Sprache
Python
Sterne
2.6k
Forks
791
Ø Merge
1 T. 12 Std.
Gemergte PRs (30 T.)
5

Beschreibung

## Short Description

In https://fedora.gitlab.io/sigs/go/go-vendor-tools/, we use the `scancode.api.get_licenses()` Python API to detect license texts contained within license files and then produce an SPDX expression ([relevant code](https://gitlab.com/fedora/sigs/go/go-vendor-tools/-/blob/main/src/go_vendor_tools/license_detection/scancode.py?ref_type=heads)). The scancode license detector is very powerful due to its large corpus of license texts, but it has a huge dependency footprint which has prevented us from making it the default license scanner in go-vendor-tools (currently, askalono is the default). Many of these dependencies are to support package scanning features that we don't use. I wonder what it would look like to extract the license scanning–related APIs into a smaller subpackage (or maybe to make more dependencies optional Python extras) without disrupting `scancode-toolkit` as a whole. Do you think that'd be feasible?

## Possible Labels

- new feature
- improve-license-detection
- installation and packaging
- core and api

## Select Category

- [x] Enhancement
- [ ] Add License/Copyright
- [ ] Scan Feature
- [x] Packaging
- [ ] Documentation
- [ ] Expand Support
- [ ] Other

## **Describe the Update**

A mechanism to use the scancode/licensedcode file license detection API (`scancode.api.get_licenses()`) without pulling in so many dependencies.

## **How This Feature will help you/your organization**

See earlier comment about Go Vendor Tools' license scanning functionality.

## **Possible Solution/Implementation Details**

See above. Reudction of dependencies in the main scancode-toolkit package (e.g., by using extras) or extracting the license scanning API are possible solutions.

## **Example/Links if Any**

## **Can you help with this Feature**

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.