mirror of
https://github.com/anchore/syft.git
synced 2025-11-18 00:43:20 +01:00
22 lines
668 B
Go
22 lines
668 B
Go
/*
|
|
Package python provides a concrete Cataloger implementation for Python ecosystem files (egg, wheel, requirements.txt).
|
|
*/
|
|
package python
|
|
|
|
import (
|
|
"github.com/anchore/syft/syft/cataloger/common"
|
|
)
|
|
|
|
// NewPythonCataloger returns a new Python cataloger object.
|
|
func NewPythonCataloger() *common.GenericCataloger {
|
|
globParsers := map[string]common.ParserFn{
|
|
"**/*egg-info/PKG-INFO": parseEggMetadata,
|
|
"**/*dist-info/METADATA": parseWheelMetadata,
|
|
"**/*requirements*.txt": parseRequirementsTxt,
|
|
"**/poetry.lock": parsePoetryLock,
|
|
"**/setup.py": parseSetup,
|
|
}
|
|
|
|
return common.NewGenericCataloger(nil, globParsers, "python-cataloger")
|
|
}
|