rules_python

package
v0.0.0-...-5428336 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProtoPyLibraryRuleName   = "proto_py_library"
	ProtoPyLibraryRuleSuffix = "_py_library"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type PyLibrary

type PyLibrary struct {
	KindName       string
	RuleNameSuffix string
	Outputs        []string
	Config         *protoc.ProtocConfiguration
	RuleConfig     *protoc.LanguageRuleConfig
	Resolver       protoc.DepsResolver
}

PyLibrary implements RuleProvider for 'py_library'-derived rules.

func (*PyLibrary) Deps

func (s *PyLibrary) Deps() []string

Deps computes the deps list for the rule.

func (*PyLibrary) Imports

func (s *PyLibrary) Imports(c *config.Config, r *rule.Rule, file *rule.File) []resolve.ImportSpec

Imports implements part of the RuleProvider interface.

func (*PyLibrary) ImportsAttr

func (s *PyLibrary) ImportsAttr() (imps []string)

ImportsAttr provides the py_library.imports attribute values.

func (*PyLibrary) Kind

func (s *PyLibrary) Kind() string

Kind implements part of the ruleProvider interface.

func (*PyLibrary) Name

func (s *PyLibrary) Name() string

Name implements part of the ruleProvider interface.

func (*PyLibrary) Resolve

func (s *PyLibrary) Resolve(c *config.Config, ix *resolve.RuleIndex, r *rule.Rule, imports []string, from label.Label)

Resolve implements part of the RuleProvider interface.

func (*PyLibrary) Rule

func (s *PyLibrary) Rule(otherGen ...*rule.Rule) *rule.Rule

Rule implements part of the ruleProvider interface.

func (*PyLibrary) Srcs

func (s *PyLibrary) Srcs() []string

Srcs computes the srcs list for the rule.

func (*PyLibrary) Visibility

func (s *PyLibrary) Visibility() []string

Visibility provides visibility labels.

Jump to

Keyboard shortcuts

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