Lines Matching refs:p
238 func (p *Module) getSrcsPathMappings() []pathMapping {
239 return p.srcsPathMappings
243 func (p *Module) getDataPathMappings() []pathMapping {
244 return p.dataPathMappings
248 func (p *Module) getSrcsZip() android.Path {
249 return p.srcsZip
256 func (p *Module) init(additionalProps ...interface{}) android.Module {
257 p.AddProperties(&p.properties, &p.protoProperties)
262 if p.bootstrapper != nil {
263 p.AddProperties(p.bootstrapper.bootstrapperProps()...)
266 android.InitAndroidArchModule(p, p.hod, p.multilib)
267 android.InitDefaultableModule(p)
269 return p
345 func (p *Module) HostToolPath() android.OptionalPath {
346 if p.installer != nil {
347 if bin, ok := p.installer.(*binaryDecorator); ok {
359 func (p *Module) OutputFiles(tag string) (android.Paths, error) {
362 if outputFile := p.installSource; outputFile.Valid() {
371 func (p *Module) isEmbeddedLauncherEnabled() bool {
372 return p.installer != nil && Bool(p.properties.Embedded_launcher)
376 for _, p := range paths {
377 if filepath.Ext(p) == ext {
385 func (p *Module) anySrcHasExt(ctx android.BottomUpMutatorContext, ext string) bool {
386 return anyHasExt(p.properties.Srcs, ext)
393 func (p *Module) DepsMutator(ctx android.BottomUpMutatorContext) {
394 android.ProtoDeps(ctx, &p.protoProperties)
397 {"python_version", p.properties.Actual_version},
401 if p.anySrcHasExt(ctx, protoExt) && p.Name() != "libprotobuf-python" {
406 …ctx.AddVariationDependencies(versionVariation, pythonLibTag, android.LastUniqueStrings(p.propertie…
412 if p.installer != nil && p.isEmbeddedLauncherEnabled() {
430 switch p.properties.Actual_version {
435 if p.bootstrapper.autorun() {
445 if p.bootstrapper.autorun() {
457 p.properties.Actual_version, ctx.ModuleName()))
467 ctx.AddVariationDependencies(javaDataVariation, javaDataTag, p.properties.Java_data...)
470 func (p *Module) GenerateAndroidBuildActions(ctx android.ModuleContext) {
471 p.generatePythonBuildActions(ctx)
474 if p.bootstrapper != nil {
477 p.collectPathsFromTransitiveDeps(ctx)
481 p.installSource = p.bootstrapper.bootstrap(ctx, p.properties.Actual_version,
482 p.isEmbeddedLauncherEnabled(), p.srcsPathMappings, p.srcsZip, p.depsSrcsZips)
486 if p.installer != nil {
494 p.installer.setAndroidMkSharedLibs(sharedLibs)
497 if p.installSource.Valid() {
498 p.installer.install(ctx, p.installSource.Path())
504 func (p *Module) generatePythonBuildActions(ctx android.ModuleContext) {
505 …expandedSrcs := android.PathsForModuleSrcExcludes(ctx, p.properties.Srcs, p.properties.Exclude_src…
507 if p.bootstrapper != nil && !p.bootstrapper.autorun() {
515 expandedData := android.PathsForModuleSrc(ctx, p.properties.Data)
523 pkgPath := String(p.properties.Pkg_path)
526 pkgPath = filepath.Clean(String(p.properties.Pkg_path))
531 String(p.properties.Pkg_path))
536 if proptools.BoolDefault(p.properties.Is_internal, false) {
541 p.genModulePathMappings(ctx, pkgPath, expandedSrcs, expandedData)
544 p.srcsZip = p.createSrcsZip(ctx, pkgPath)
563 func (p *Module) genModulePathMappings(ctx android.ModuleContext, pkgPath string,
579 if !checkForDuplicateOutputPath(ctx, destToPySrcs, runfilesPath, s.String(), p.Name(), p.Name()) {
580 p.srcsPathMappings = append(p.srcsPathMappings, pathMapping{dest: runfilesPath, src: s})
590 if !checkForDuplicateOutputPath(ctx, destToPyData, runfilesPath, d.String(), p.Name(), p.Name()) {
591 p.dataPathMappings = append(p.dataPathMappings,
598 func (p *Module) createSrcsZip(ctx android.ModuleContext, pkgPath string) android.Path {
600 pathMappings := append(p.srcsPathMappings, p.dataPathMappings...)
621 protoFlags := android.GetProtoFlags(ctx, &p.protoProperties)
687 func (p *Module) isLibrary() bool {
689 return p.bootstrapper == nil && p.installer == nil
692 func (p *Module) isBinary() bool {
693 _, ok := p.bootstrapper.(*binaryDecorator)
700 func (p *Module) collectPathsFromTransitiveDeps(ctx android.ModuleContext) {
705 for _, path := range p.srcsPathMappings {
708 for _, path := range p.dataPathMappings {
742 p.depsSrcsZips = append(p.depsSrcsZips, dep.getSrcsZip())
766 func (p *Module) InstallInData() bool {
770 func (p *Module) ConvertWithBp2build(ctx android.TopDownMutatorContext) {
771 if p.isLibrary() {
772 pythonLibBp2Build(ctx, p)
773 } else if p.isBinary() {
774 pythonBinaryBp2Build(ctx, p)