Back to godoc.org

Package cipd

v0.0.0-...-1557bcf
Latest Go to latest

The latest major version is .

Published: Aug 13, 2020 | License: Apache-2.0 | Module: github.com/luci/luci-go

Index

func PlatformForPEP425Tag

func PlatformForPEP425Tag(t *vpython.PEP425Tag) string

PlatformForPEP425Tag returns the CIPD platform inferred from a given Python PEP425 tag.

If the platform could not be determined, an empty string will be returned.

type PackageLoader

type PackageLoader struct {
	// Options are additional client options to use when generating CIPD clients.
	Options cipd.ClientOptions

	// Template, if not nil, is a callback that will return additional CIPD
	// package template parameters. These may be derived from the VirtualEnv's
	// runtime environment.
	//
	// For example, if a user wanted to include the Python PEP425 tag version
	// as a CIPD template variable, they could include a "py_pep425_tag"
	// template parameter.
	Template TemplateFunc
}

PackageLoader is an implementation of venv.PackageLoader that uses the CIPD service to fetch packages.

Packages that use the CIPD loader use the CIPD package name as their Path and a CIPD version/tag/ref as their Version.

func (*PackageLoader) Ensure

func (pl *PackageLoader) Ensure(c context.Context, root string, packages []*vpython.Spec_Package) error

Ensure implement venv.PackageLoader.

The packages must be valid (PackageIsComplete). If they aren't, Ensure will panic.

The CIPD client that is used for the operation is generated from the supplied options, opts.

func (*PackageLoader) Resolve

func (pl *PackageLoader) Resolve(c context.Context, e *vpython.Environment) error

Resolve implements venv.PackageLoader.

The resulting packages slice will be updated in-place with the resolved package name and instance ID.

func (*PackageLoader) Verify

func (pl *PackageLoader) Verify(c context.Context, sp *vpython.Spec, tags []*vpython.PEP425Tag) error

Verify implements venv.PackageLoader.

type TemplateFunc

type TemplateFunc func(context.Context, []*vpython.PEP425Tag) (map[string]string, error)

TemplateFunc builds a set of template parameters to augment the default CIPD parameter set with.

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier