luci: go.chromium.org/luci/vpython/cipd Index | Files

package cipd

import "go.chromium.org/luci/vpython/cipd"

Index

Package Files

cipd.go pep425.go

func PlatformForPEP425Tag Uses

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 Uses

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 Uses

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 Uses

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 Uses

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

Verify implements venv.PackageLoader.

type TemplateFunc Uses

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 cipd imports 12 packages (graph) and is imported by 1 packages. Updated 2018-12-14. Refresh now. Tools for package owners.