wheelegg

package
v0.4.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 9, 2026 License: Apache-2.0, BSD-3-Clause, MIT Imports: 20 Imported by: 0

Documentation

Overview

Package wheelegg extracts wheel and egg files.

Index

Constants

View Source
const (
	// Name is the unique name of this extractor.
	Name = "python/wheelegg"
)

Variables

View Source
var ErrSizeNotSet = errors.New("input.Info is nil, but should have Size set")

ErrSizeNotSet will trigger when Info.Size() is not set.

Functions

func New

New returns a wheel/egg extractor.

Types

type Extractor

type Extractor struct {
	Stats stats.Collector
	// contains filtered or unexported fields
}

Extractor extracts python packages from wheel/egg files.

func (Extractor) Extract

Extract extracts packages from wheel/egg files passed through the scan input. For .egg files, input.Info.Size() is required to unzip the file.

func (Extractor) FileRequired

func (e Extractor) FileRequired(api filesystem.FileAPI) bool

FileRequired returns true if the specified file matches python Metadata file patterns.

func (Extractor) Name

func (e Extractor) Name() string

Name of the extractor.

func (Extractor) Requirements added in v0.1.3

func (e Extractor) Requirements() *plugin.Capabilities

Requirements of the extractor.

func (Extractor) Version

func (e Extractor) Version() int

Version of the extractor.

type PythonPackageMetadata

type PythonPackageMetadata struct {
	Author      string `json:"author"`
	AuthorEmail string `json:"authorEmail"`
}

PythonPackageMetadata holds parsing information from a python egg or wheel package.

func ToStruct added in v0.3.2

ToStruct converts the PythonPackageMetadata proto to a Metadata struct.

func (*PythonPackageMetadata) SetProto added in v0.3.2

func (m *PythonPackageMetadata) SetProto(p *pb.Package)

SetProto sets the PythonMetadata field in the Package proto.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL