Documentation
¶
Overview ¶
Package setupcfg extracts Python dependencies from setup.cfg files.
Index ¶
Constants ¶
const (
// Name is the unique name of this extractor.
Name = "python/setupcfg"
)
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(_ *cpb.PluginConfig) (filesystem.Extractor, error)
New returns a new instance of the extractor.
Types ¶
type Extractor ¶
type Extractor struct{}
Extractor extracts Python packages from setup.cfg manifests.
func (Extractor) Extract ¶
func (e Extractor) Extract(ctx context.Context, input *filesystem.ScanInput) (inventory.Inventory, error)
Extract extracts packages from setup.cfg files passed through the scan input.
func (Extractor) FileRequired ¶
func (e Extractor) FileRequired(api filesystem.FileAPI) bool
FileRequired returns true if the file is named exactly "setup.cfg".
func (Extractor) Requirements ¶
func (e Extractor) Requirements() *plugin.Capabilities
Requirements of the extractor.
type Metadata ¶
type Metadata struct {
// Requirement is the full PEP 508 requirement string (e.g. "requests==2.31.0").
Requirement string
// VersionComparator is the operator used (e.g. "==", ">=", "~=").
VersionComparator string
// DepGroupVals holds the extras group (e.g. "dev", "test") if this
// dependency came from [options.extras_require].
DepGroupVals []string
}
Metadata holds setup.cfg-specific package metadata for future enrichment.
func (*Metadata) IsProtoable ¶
func (m *Metadata) IsProtoable()
IsProtoable marks this metadata as not proto-serialized yet.