wheel

package module
v0.0.0-...-80e913b Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2020 License: MIT Imports: 6 Imported by: 0

README

go-wheel

A PythonWheel Parser for Golang.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindFile

func FindFile(r *zip.ReadCloser, filename string) (f *zip.File, err error)

func Open

func Open(filename string) (reader *zip.ReadCloser, err error)

Types

type Metadata

type Metadata struct {
	Header mail.Header
	Body   string
}

func ReadMetadata

func ReadMetadata(f *zip.File) (metadata *Metadata, err error)

func (*Metadata) FetchAll

func (m *Metadata) FetchAll(key string) ([]string, bool)

func (*Metadata) FetchOne

func (m *Metadata) FetchOne(key string) (string, bool)

type WheelFile

type WheelFile struct {
	// Distribution name, e.g. 'django', 'pyramid'.
	Distribution string
	// Distribution version, e.g. 1.0.
	Version string
	// Optional build number. Must start with a digit.
	BuildTag string
	// E.g. 'py27', 'py2', 'py3'.
	PythonTag string
	// E.g. 'cp33m', 'abi3', 'none'.
	ABITag string
	// E.g. 'linux_x86_64', 'any'.
	PlatformTag string
}

The wheel filename is {distribution}-{version}(-{build tag})?-{python tag}-{abi tag}-{platform tag}.whl.

func ParseFilename

func ParseFilename(filename string) (f *WheelFile, err error)

func (*WheelFile) PathToDistInfo

func (w *WheelFile) PathToDistInfo() string

func (*WheelFile) PathToMetadata

func (w *WheelFile) PathToMetadata() string

func (*WheelFile) PathToWheel

func (w *WheelFile) PathToWheel() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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