Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PlatformForPEP425Tag ¶
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 ¶
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.