cipd

package
v0.0.0-...-51f9457 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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.

Types

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

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.

Jump to

Keyboard shortcuts

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