Lines Matching refs:p

176 func (p *Module) GetSrcsPathMappings() []pathMapping {
177 return p.srcsPathMappings
180 func (p *Module) GetDataPathMappings() []pathMapping {
181 return p.dataPathMappings
184 func (p *Module) GetSrcsZip() android.Path {
185 return p.srcsZip
192 func (p *Module) Init() android.Module {
194 p.AddProperties(&p.properties, &p.protoProperties)
195 if p.bootstrapper != nil {
196 p.AddProperties(p.bootstrapper.bootstrapperProps()...)
199 android.InitAndroidArchModule(p, p.hod, p.multilib)
200 android.InitDefaultableModule(p)
202 return p
253 func (p *Module) HostToolPath() android.OptionalPath {
254 if p.installer == nil {
258 return android.OptionalPathForPath(p.installer.(*binaryDecorator).path)
261 func (p *Module) OutputFiles(tag string) (android.Paths, error) {
264 if outputFile := p.installSource; outputFile.Valid() {
273 func (p *Module) isEmbeddedLauncherEnabled(actual_version string) bool {
276 return Bool(p.properties.Version.Py2.Embedded_launcher)
278 return Bool(p.properties.Version.Py3.Embedded_launcher)
294 func (p *Module) hasSrcExt(ctx android.BottomUpMutatorContext, ext string) bool {
295 if hasSrcExt(p.properties.Srcs, protoExt) {
298 switch p.properties.Actual_version {
300 return hasSrcExt(p.properties.Version.Py2.Srcs, protoExt)
302 return hasSrcExt(p.properties.Version.Py3.Srcs, protoExt)
305 p.properties.Actual_version, ctx.ModuleName()))
309 func (p *Module) DepsMutator(ctx android.BottomUpMutatorContext) {
310 android.ProtoDeps(ctx, &p.protoProperties)
312 if p.hasSrcExt(ctx, protoExt) && p.Name() != "libprotobuf-python" {
315 switch p.properties.Actual_version {
318 uniqueLibs(ctx, p.properties.Libs, "version.py2.libs",
319 p.properties.Version.Py2.Libs)...)
321 if p.bootstrapper != nil && p.isEmbeddedLauncherEnabled(pyVersion2) {
325 if p.bootstrapper.autorun() {
344 uniqueLibs(ctx, p.properties.Libs, "version.py3.libs",
345 p.properties.Version.Py3.Libs)...)
347 if p.bootstrapper != nil && p.isEmbeddedLauncherEnabled(pyVersion3) {
351 if p.bootstrapper.autorun() {
374 p.properties.Actual_version, ctx.ModuleName()))
406 func (p *Module) GenerateAndroidBuildActions(ctx android.ModuleContext) {
407 p.GeneratePythonBuildActions(ctx)
410 if p.bootstrapper != nil {
411 p.walkTransitiveDeps(ctx)
413 if p.properties.Actual_version == pyVersion2 {
414 embeddedLauncher = p.isEmbeddedLauncherEnabled(pyVersion2)
416 embeddedLauncher = p.isEmbeddedLauncherEnabled(pyVersion3)
418 p.installSource = p.bootstrapper.bootstrap(ctx, p.properties.Actual_version,
419 embeddedLauncher, p.srcsPathMappings, p.srcsZip, p.depsSrcsZips)
422 if p.installer != nil {
429 p.installer.setAndroidMkSharedLibs(sharedLibs)
431 if p.installSource.Valid() {
432 p.installer.install(ctx, p.installSource.Path())
438 func (p *Module) GeneratePythonBuildActions(ctx android.ModuleContext) {
440 srcs := p.properties.Srcs
441 exclude_srcs := p.properties.Exclude_srcs
442 switch p.properties.Actual_version {
444 srcs = append(srcs, p.properties.Version.Py2.Srcs...)
445 exclude_srcs = append(exclude_srcs, p.properties.Version.Py2.Exclude_srcs...)
447 srcs = append(srcs, p.properties.Version.Py3.Srcs...)
448 exclude_srcs = append(exclude_srcs, p.properties.Version.Py3.Exclude_srcs...)
451 p.properties.Actual_version, ctx.ModuleName()))
455 if p.bootstrapper != nil && !p.bootstrapper.autorun() {
463 expandedData := android.PathsForModuleSrc(ctx, p.properties.Data)
466 pkgPath := String(p.properties.Pkg_path)
468 pkgPath = filepath.Clean(String(p.properties.Pkg_path))
473 String(p.properties.Pkg_path))
476 if p.properties.Is_internal != nil && *p.properties.Is_internal {
480 if p.properties.Is_internal != nil && *p.properties.Is_internal {
485 p.genModulePathMappings(ctx, pkgPath, expandedSrcs, expandedData)
487 p.srcsZip = p.createSrcsZip(ctx, pkgPath)
492 func (p *Module) genModulePathMappings(ctx android.ModuleContext, pkgPath string,
513 if fillInMap(ctx, destToPySrcs, runfilesPath, s.String(), p.Name(), p.Name()) {
514 p.srcsPathMappings = append(p.srcsPathMappings,
525 if fillInMap(ctx, destToPyData, runfilesPath, d.String(), p.Name(), p.Name()) {
526 p.dataPathMappings = append(p.dataPathMappings,
533 func (p *Module) createSrcsZip(ctx android.ModuleContext, pkgPath string) android.Path {
535 pathMappings := append(p.srcsPathMappings, p.dataPathMappings...)
555 protoFlags := android.GetProtoFlags(ctx, &p.protoProperties)
625 func (p *Module) walkTransitiveDeps(ctx android.ModuleContext) {
631 for _, path := range p.srcsPathMappings {
634 for _, path := range p.dataPathMappings {
668 p.depsSrcsZips = append(p.depsSrcsZips, dep.GetSrcsZip())
689 func (p *Module) InstallInData() bool {