Documentation

Overview

    Package vpython contains `vpython` environment definition protobufs.

    Index

    Constants

    View Source
    const Version = "v2"

      Version is a version string. It must be updated any time the text protobufs advance in a non-backwards-compatible way.

      This version string is used in the generation of filenames, and must be filesystem-compatible.

      Variables

      View Source
      var File_go_chromium_org_luci_vpython_api_vpython_env_proto protoreflect.FileDescriptor
      View Source
      var File_go_chromium_org_luci_vpython_api_vpython_pep425_proto protoreflect.FileDescriptor
      View Source
      var File_go_chromium_org_luci_vpython_api_vpython_spec_proto protoreflect.FileDescriptor

      Functions

      This section is empty.

      Types

      type Environment

      type Environment struct {
      
      	// A constructed VirtualEnv.
      	Spec *Spec `protobuf:"bytes,1,opt,name=spec,proto3" json:"spec,omitempty"`
      	// The resolved runtime parameters.
      	Runtime *Runtime `protobuf:"bytes,2,opt,name=runtime,proto3" json:"runtime,omitempty"`
      	// The PEP425 tags that were probed for this Python environment.
      	Pep425Tag []*PEP425Tag `protobuf:"bytes,3,rep,name=pep425_tag,json=pep425Tag,proto3" json:"pep425_tag,omitempty"`
      	// contains filtered or unexported fields
      }

        Environment describes a constructed VirtualEnv.

        func (*Environment) Clone

        func (e *Environment) Clone() *Environment

          Clone returns a deep clone of the supplied Environment.

          If e is nil, a non-nil empty Environment will be returned.

          func (*Environment) Descriptor

          func (*Environment) Descriptor() ([]byte, []int)

            Deprecated: Use Environment.ProtoReflect.Descriptor instead.

            func (*Environment) GetPep425Tag

            func (x *Environment) GetPep425Tag() []*PEP425Tag

            func (*Environment) GetRuntime

            func (x *Environment) GetRuntime() *Runtime

            func (*Environment) GetSpec

            func (x *Environment) GetSpec() *Spec

            func (*Environment) ProtoMessage

            func (*Environment) ProtoMessage()

            func (*Environment) ProtoReflect

            func (x *Environment) ProtoReflect() protoreflect.Message

            func (*Environment) Reset

            func (x *Environment) Reset()

            func (*Environment) String

            func (x *Environment) String() string

            type PEP425Tag

            type PEP425Tag struct {
            
            	// Python is the PEP425 python tag (e.g., "cp27").
            	Python string `protobuf:"bytes,1,opt,name=python,proto3" json:"python,omitempty"`
            	// ABI is the PEP425 "python ABI" tag (e.g., "cp27mu", "none").
            	Abi string `protobuf:"bytes,2,opt,name=abi,proto3" json:"abi,omitempty"`
            	// Platform is the PEP425 "python platform" tag (e.g., "linux_x86_64",
            	// "armv7l", "any").
            	Platform string `protobuf:"bytes,3,opt,name=platform,proto3" json:"platform,omitempty"`
            	// contains filtered or unexported fields
            }

              Represents a Python PEP425 tag.

              func (*PEP425Tag) AnyPlatform

              func (t *PEP425Tag) AnyPlatform() bool

                AnyPlatform returns true if t declares that it works on any platform.

                func (*PEP425Tag) Count

                func (t *PEP425Tag) Count() (v int)

                  Count returns the number of populated fields in this tag.

                  func (*PEP425Tag) Descriptor

                  func (*PEP425Tag) Descriptor() ([]byte, []int)

                    Deprecated: Use PEP425Tag.ProtoReflect.Descriptor instead.

                    func (*PEP425Tag) GetAbi

                    func (x *PEP425Tag) GetAbi() string

                    func (*PEP425Tag) GetPlatform

                    func (x *PEP425Tag) GetPlatform() string

                    func (*PEP425Tag) GetPython

                    func (x *PEP425Tag) GetPython() string

                    func (*PEP425Tag) HasABI

                    func (t *PEP425Tag) HasABI() bool

                      HasABI returns true if t declares that it only works with a specific ABI.

                      func (*PEP425Tag) IsZero

                      func (t *PEP425Tag) IsZero() bool

                        IsZero returns true if this tag is a zero value.

                        func (*PEP425Tag) ProtoMessage

                        func (*PEP425Tag) ProtoMessage()

                        func (*PEP425Tag) ProtoReflect

                        func (x *PEP425Tag) ProtoReflect() protoreflect.Message

                        func (*PEP425Tag) Reset

                        func (x *PEP425Tag) Reset()

                        func (*PEP425Tag) String

                        func (x *PEP425Tag) String() string

                        func (*PEP425Tag) TagString

                        func (t *PEP425Tag) TagString() string

                          TagString returns an underscore-separated string containing t's fields.

                          type Runtime

                          type Runtime struct {
                          
                          	// The absolute path to the resolved interpreter (sys.executable).
                          	Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
                          	// The SHA256 hash of the resolved interpreter.
                          	Hash string `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"`
                          	// The resolved Python interpreter version.
                          	Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"`
                          	// The prefix of the Python interpreter (sys.prefix).
                          	Prefix string `protobuf:"bytes,4,opt,name=prefix,proto3" json:"prefix,omitempty"`
                          	// contains filtered or unexported fields
                          }

                            Runtime is the set of resolved runtime parameters.

                            func (*Runtime) Descriptor

                            func (*Runtime) Descriptor() ([]byte, []int)

                              Deprecated: Use Runtime.ProtoReflect.Descriptor instead.

                              func (*Runtime) GetHash

                              func (x *Runtime) GetHash() string

                              func (*Runtime) GetPath

                              func (x *Runtime) GetPath() string

                              func (*Runtime) GetPrefix

                              func (x *Runtime) GetPrefix() string

                              func (*Runtime) GetVersion

                              func (x *Runtime) GetVersion() string

                              func (*Runtime) ProtoMessage

                              func (*Runtime) ProtoMessage()

                              func (*Runtime) ProtoReflect

                              func (x *Runtime) ProtoReflect() protoreflect.Message

                              func (*Runtime) Reset

                              func (x *Runtime) Reset()

                              func (*Runtime) String

                              func (x *Runtime) String() string

                              type Spec

                              type Spec struct {
                              
                              	// The Python version to use. This should be of the form:
                              	// "Major[.Minor[.Patch]]"
                              	//
                              	// If specified,
                              	// - The Major version will be enforced absolutely. Python 3 will not be
                              	//   preferred over Python 2 because '3' is greater than '2'.
                              	// - The remaining versions, if specified, will be regarded as *minimum*
                              	//   versions. In other words, if "2.7.4" is specified and the system has
                              	//   "2.7.12", that will suffice. Similarly, "2.6" would accept a "2.7"
                              	//   interpreter.
                              	//
                              	// If empty, the default Python interpreter ("python") will be used.
                              	PythonVersion string          `protobuf:"bytes,1,opt,name=python_version,json=pythonVersion,proto3" json:"python_version,omitempty"`
                              	Wheel         []*Spec_Package `protobuf:"bytes,2,rep,name=wheel,proto3" json:"wheel,omitempty"`
                              	// The VirtualEnv package.
                              	//
                              	// This should be left empty to use the `vpython` default package
                              	// (recommended).
                              	Virtualenv *Spec_Package `protobuf:"bytes,3,opt,name=virtualenv,proto3" json:"virtualenv,omitempty"`
                              	// Specification-provided PEP425 verification tags.
                              	//
                              	// By default, verification will be performed against a default set of
                              	// environment parameters. However, a given specification may offer its own
                              	// set of PEP425 tags representing the systems that it wants to be verified
                              	// against.
                              	VerifyPep425Tag []*PEP425Tag `protobuf:"bytes,4,rep,name=verify_pep425_tag,json=verifyPep425Tag,proto3" json:"verify_pep425_tag,omitempty"`
                              	// contains filtered or unexported fields
                              }

                                Spec is a "vpython" environment specification.

                                func (*Spec) Clone

                                func (s *Spec) Clone() *Spec

                                  Clone returns a deep clone of the supplied Spec.

                                  If e is nil, a non-nil empty Spec will be returned.

                                  func (*Spec) Descriptor

                                  func (*Spec) Descriptor() ([]byte, []int)

                                    Deprecated: Use Spec.ProtoReflect.Descriptor instead.

                                    func (*Spec) GetPythonVersion

                                    func (x *Spec) GetPythonVersion() string

                                    func (*Spec) GetVerifyPep425Tag

                                    func (x *Spec) GetVerifyPep425Tag() []*PEP425Tag

                                    func (*Spec) GetVirtualenv

                                    func (x *Spec) GetVirtualenv() *Spec_Package

                                    func (*Spec) GetWheel

                                    func (x *Spec) GetWheel() []*Spec_Package

                                    func (*Spec) ProtoMessage

                                    func (*Spec) ProtoMessage()

                                    func (*Spec) ProtoReflect

                                    func (x *Spec) ProtoReflect() protoreflect.Message

                                    func (*Spec) Reset

                                    func (x *Spec) Reset()

                                    func (*Spec) String

                                    func (x *Spec) String() string

                                    type Spec_Package

                                    type Spec_Package struct {
                                    
                                    	// The name of the package.
                                    	//
                                    	// - For CIPD, this is the package name.
                                    	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
                                    	// The package version.
                                    	//
                                    	// - For CIPD, this will be any recognized CIPD version (i.e., ID, tag, or
                                    	//   ref).
                                    	Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
                                    	// Optional PEP425 tags to determine whether this package is included on the
                                    	// target system. If no match tags are specified, this package will always
                                    	// be included. If match tags are specified, the package will be included if
                                    	// any system PEP425 tags match at least one of the match tags.
                                    	//
                                    	// A match will succeed if any system PEP425 tag field matches the
                                    	// corresponding field in the PEP425 tag. If the match tag omits a field
                                    	// (partial), that field will not be considered. For example, if a match
                                    	// tag specifies just an ABI field, any system PEP425 tag with that ABI will
                                    	// be considered a successful match, regardless of other field values.
                                    	MatchTag []*PEP425Tag `protobuf:"bytes,3,rep,name=match_tag,json=matchTag,proto3" json:"match_tag,omitempty"`
                                    	// Optional PEP425 tags to determine whether this package is NOT included on
                                    	// the target system. This has the opposite behavior as "match_tag": if any
                                    	// host tags match any tags in this list, the package will not be installed
                                    	// on this host.
                                    	//
                                    	// A "not_match_tag" overrides a "match_tag", so if a host has tags that
                                    	// match entries in both, the package will be not considered a match.
                                    	NotMatchTag []*PEP425Tag `protobuf:"bytes,4,rep,name=not_match_tag,json=notMatchTag,proto3" json:"not_match_tag,omitempty"`
                                    	// contains filtered or unexported fields
                                    }

                                      A definition for a remote package. The type of package depends on the configured package resolver.

                                      func (*Spec_Package) Descriptor

                                      func (*Spec_Package) Descriptor() ([]byte, []int)

                                        Deprecated: Use Spec_Package.ProtoReflect.Descriptor instead.

                                        func (*Spec_Package) GetMatchTag

                                        func (x *Spec_Package) GetMatchTag() []*PEP425Tag

                                        func (*Spec_Package) GetName

                                        func (x *Spec_Package) GetName() string

                                        func (*Spec_Package) GetNotMatchTag

                                        func (x *Spec_Package) GetNotMatchTag() []*PEP425Tag

                                        func (*Spec_Package) GetVersion

                                        func (x *Spec_Package) GetVersion() string

                                        func (*Spec_Package) ProtoMessage

                                        func (*Spec_Package) ProtoMessage()

                                        func (*Spec_Package) ProtoReflect

                                        func (x *Spec_Package) ProtoReflect() protoreflect.Message

                                        func (*Spec_Package) Reset

                                        func (x *Spec_Package) Reset()

                                        func (*Spec_Package) String

                                        func (x *Spec_Package) String() string