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

package vpython

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

Package vpython contains `vpython` environment definition protobufs.

Index

Package Files

env.pb.go gen.go pep425.pb.go spec.pb.go util.go

Constants

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.

type Environment Uses

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"`
    XXX_NoUnkeyedLiteral struct{}     `json:"-"`
    XXX_unrecognized     []byte       `json:"-"`
    XXX_sizecache        int32        `json:"-"`
}

Environment describes a constructed VirtualEnv.

func (*Environment) Clone Uses

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 Uses

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

func (*Environment) GetPep425Tag Uses

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

func (*Environment) GetRuntime Uses

func (m *Environment) GetRuntime() *Runtime

func (*Environment) GetSpec Uses

func (m *Environment) GetSpec() *Spec

func (*Environment) ProtoMessage Uses

func (*Environment) ProtoMessage()

func (*Environment) Reset Uses

func (m *Environment) Reset()

func (*Environment) String Uses

func (m *Environment) String() string

func (*Environment) XXX_DiscardUnknown Uses

func (m *Environment) XXX_DiscardUnknown()

func (*Environment) XXX_Marshal Uses

func (m *Environment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Environment) XXX_Merge Uses

func (m *Environment) XXX_Merge(src proto.Message)

func (*Environment) XXX_Size Uses

func (m *Environment) XXX_Size() int

func (*Environment) XXX_Unmarshal Uses

func (m *Environment) XXX_Unmarshal(b []byte) error

type PEP425Tag Uses

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"`
    XXX_NoUnkeyedLiteral struct{} `json:"-"`
    XXX_unrecognized     []byte   `json:"-"`
    XXX_sizecache        int32    `json:"-"`
}

Represents a Python PEP425 tag.

func (*PEP425Tag) AnyPlatform Uses

func (t *PEP425Tag) AnyPlatform() bool

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

func (*PEP425Tag) Count Uses

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

Count returns the number of populated fields in this tag.

func (*PEP425Tag) Descriptor Uses

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

func (*PEP425Tag) GetAbi Uses

func (m *PEP425Tag) GetAbi() string

func (*PEP425Tag) GetPlatform Uses

func (m *PEP425Tag) GetPlatform() string

func (*PEP425Tag) GetPython Uses

func (m *PEP425Tag) GetPython() string

func (*PEP425Tag) HasABI Uses

func (t *PEP425Tag) HasABI() bool

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

func (*PEP425Tag) IsZero Uses

func (t *PEP425Tag) IsZero() bool

IsZero returns true if this tag is a zero value.

func (*PEP425Tag) ProtoMessage Uses

func (*PEP425Tag) ProtoMessage()

func (*PEP425Tag) Reset Uses

func (m *PEP425Tag) Reset()

func (*PEP425Tag) String Uses

func (m *PEP425Tag) String() string

func (*PEP425Tag) TagString Uses

func (t *PEP425Tag) TagString() string

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

func (*PEP425Tag) XXX_DiscardUnknown Uses

func (m *PEP425Tag) XXX_DiscardUnknown()

func (*PEP425Tag) XXX_Marshal Uses

func (m *PEP425Tag) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PEP425Tag) XXX_Merge Uses

func (m *PEP425Tag) XXX_Merge(src proto.Message)

func (*PEP425Tag) XXX_Size Uses

func (m *PEP425Tag) XXX_Size() int

func (*PEP425Tag) XXX_Unmarshal Uses

func (m *PEP425Tag) XXX_Unmarshal(b []byte) error

type Runtime Uses

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"`
    XXX_NoUnkeyedLiteral struct{} `json:"-"`
    XXX_unrecognized     []byte   `json:"-"`
    XXX_sizecache        int32    `json:"-"`
}

Runtime is the set of resolved runtime parameters.

func (*Runtime) Descriptor Uses

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

func (*Runtime) GetHash Uses

func (m *Runtime) GetHash() string

func (*Runtime) GetPath Uses

func (m *Runtime) GetPath() string

func (*Runtime) GetPrefix Uses

func (m *Runtime) GetPrefix() string

func (*Runtime) GetVersion Uses

func (m *Runtime) GetVersion() string

func (*Runtime) ProtoMessage Uses

func (*Runtime) ProtoMessage()

func (*Runtime) Reset Uses

func (m *Runtime) Reset()

func (*Runtime) String Uses

func (m *Runtime) String() string

func (*Runtime) XXX_DiscardUnknown Uses

func (m *Runtime) XXX_DiscardUnknown()

func (*Runtime) XXX_Marshal Uses

func (m *Runtime) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Runtime) XXX_Merge Uses

func (m *Runtime) XXX_Merge(src proto.Message)

func (*Runtime) XXX_Size Uses

func (m *Runtime) XXX_Size() int

func (*Runtime) XXX_Unmarshal Uses

func (m *Runtime) XXX_Unmarshal(b []byte) error

type Spec Uses

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"`
    XXX_NoUnkeyedLiteral struct{}     `json:"-"`
    XXX_unrecognized     []byte       `json:"-"`
    XXX_sizecache        int32        `json:"-"`
}

Spec is a "vpython" environment specification.

func (*Spec) Clone Uses

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 Uses

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

func (*Spec) GetPythonVersion Uses

func (m *Spec) GetPythonVersion() string

func (*Spec) GetVerifyPep425Tag Uses

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

func (*Spec) GetVirtualenv Uses

func (m *Spec) GetVirtualenv() *Spec_Package

func (*Spec) GetWheel Uses

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

func (*Spec) ProtoMessage Uses

func (*Spec) ProtoMessage()

func (*Spec) Reset Uses

func (m *Spec) Reset()

func (*Spec) String Uses

func (m *Spec) String() string

func (*Spec) XXX_DiscardUnknown Uses

func (m *Spec) XXX_DiscardUnknown()

func (*Spec) XXX_Marshal Uses

func (m *Spec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Spec) XXX_Merge Uses

func (m *Spec) XXX_Merge(src proto.Message)

func (*Spec) XXX_Size Uses

func (m *Spec) XXX_Size() int

func (*Spec) XXX_Unmarshal Uses

func (m *Spec) XXX_Unmarshal(b []byte) error

type Spec_Package Uses

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"`
    XXX_NoUnkeyedLiteral struct{}     `json:"-"`
    XXX_unrecognized     []byte       `json:"-"`
    XXX_sizecache        int32        `json:"-"`
}

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

func (*Spec_Package) Descriptor Uses

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

func (*Spec_Package) GetMatchTag Uses

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

func (*Spec_Package) GetName Uses

func (m *Spec_Package) GetName() string

func (*Spec_Package) GetNotMatchTag Uses

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

func (*Spec_Package) GetVersion Uses

func (m *Spec_Package) GetVersion() string

func (*Spec_Package) ProtoMessage Uses

func (*Spec_Package) ProtoMessage()

func (*Spec_Package) Reset Uses

func (m *Spec_Package) Reset()

func (*Spec_Package) String Uses

func (m *Spec_Package) String() string

func (*Spec_Package) XXX_DiscardUnknown Uses

func (m *Spec_Package) XXX_DiscardUnknown()

func (*Spec_Package) XXX_Marshal Uses

func (m *Spec_Package) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Spec_Package) XXX_Merge Uses

func (m *Spec_Package) XXX_Merge(src proto.Message)

func (*Spec_Package) XXX_Size Uses

func (m *Spec_Package) XXX_Size() int

func (*Spec_Package) XXX_Unmarshal Uses

func (m *Spec_Package) XXX_Unmarshal(b []byte) error

Package vpython imports 4 packages (graph) and is imported by 11 packages. Updated 2018-10-19. Refresh now. Tools for package owners.