summaryrefslogtreecommitdiff
path: root/python/python.go
diff options
context:
space:
mode:
author Cole Faust <colefaust@google.com> 2022-10-21 16:07:56 -0700
committer Cole Faust <colefaust@google.com> 2022-10-21 16:07:56 -0700
commitcaf766b74f688deb9e0b9b6bdb6b65b54dfc553d (patch)
treec259b15e1f609cab55b41e47df01029c27430c14 /python/python.go
parenta9e1df1522e739fd20cd6eb91ee7474fba94ed23 (diff)
Remove flags that enable the new python path behavior
The new behavior has been enabled by default, and these flags aren't necessary anymore. Fixes: 245583294 Test: m py_dont_import_folder_of_entrypoint_test && /ssd/aosp-master/out/host/linux-x86/testcases/py_dont_import_folder_of_entrypoint_test/x86_64/py_dont_import_folder_of_entrypoint_test Change-Id: I5b6f98da51791bc5d28662ef799a10c1bb6a35a0
Diffstat (limited to 'python/python.go')
-rw-r--r--python/python.go16
1 files changed, 2 insertions, 14 deletions
diff --git a/python/python.go b/python/python.go
index 6f3a0ecf3..24e1bb2ec 100644
--- a/python/python.go
+++ b/python/python.go
@@ -120,15 +120,6 @@ type BaseProperties struct {
// whether the binary is required to be built with embedded launcher for this actual_version.
// this is set by the python version mutator based on version-specific properties
Embedded_launcher *bool `blueprint:"mutated"`
-
- Proto struct {
- // Whether generated python protos should include the pkg_path in
- // their import statements. This is a temporary flag to help transition to
- // the new behavior where this is always true. It will be removed after all
- // usages of protos with pkg_path have been updated. The default is currently
- // false.
- Respect_pkg_path *bool
- }
}
type baseAttributes struct {
@@ -677,9 +668,7 @@ func (p *Module) createSrcsZip(ctx android.ModuleContext, pkgPath string) androi
protoFlags := android.GetProtoFlags(ctx, &p.protoProperties)
protoFlags.OutTypeFlag = "--python_out"
- protosRespectPkgPath := proptools.BoolDefault(p.properties.Proto.Respect_pkg_path, true)
- pkgPathForProtos := pkgPath
- if pkgPathForProtos != "" && protosRespectPkgPath {
+ if pkgPath != "" {
pkgPathStagingDir := android.PathForModuleGen(ctx, "protos_staged_for_pkg_path")
rule := android.NewRuleBuilder(pctx, ctx)
var stagedProtoSrcs android.Paths
@@ -691,11 +680,10 @@ func (p *Module) createSrcsZip(ctx android.ModuleContext, pkgPath string) androi
}
rule.Build("stage_protos_for_pkg_path", "Stage protos for pkg_path")
protoSrcs = stagedProtoSrcs
- pkgPathForProtos = ""
}
for _, srcFile := range protoSrcs {
- zip := genProto(ctx, srcFile, protoFlags, pkgPathForProtos)
+ zip := genProto(ctx, srcFile, protoFlags)
zips = append(zips, zip)
}
}