Merge "Remove BUILD_BROKEN_USES_SOONG_PYTHON2_MODULES" into main am: dd46300414 am: 0776ae425d

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3261492

Change-Id: I2045d6f00a14f2d04cd8628ef11a105fc41cef40
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Cole Faust
2024-09-10 19:42:33 +00:00
committed by Automerger Merge Worker
3 changed files with 2 additions and 8 deletions

View File

@@ -1828,10 +1828,6 @@ func (c *deviceConfig) BuildBrokenTrebleSyspropNeverallow() bool {
return c.config.productVariables.BuildBrokenTrebleSyspropNeverallow
}
func (c *deviceConfig) BuildBrokenUsesSoongPython2Modules() bool {
return c.config.productVariables.BuildBrokenUsesSoongPython2Modules
}
func (c *deviceConfig) BuildDebugfsRestrictionsEnabled() bool {
return c.config.productVariables.BuildDebugfsRestrictionsEnabled
}

View File

@@ -445,7 +445,6 @@ type ProductVariables struct {
GenruleSandboxing *bool `json:",omitempty"`
BuildBrokenEnforceSyspropOwner bool `json:",omitempty"`
BuildBrokenTrebleSyspropNeverallow bool `json:",omitempty"`
BuildBrokenUsesSoongPython2Modules bool `json:",omitempty"`
BuildBrokenVendorPropertyNamespace bool `json:",omitempty"`
BuildBrokenIncorrectPartitionImages bool `json:",omitempty"`
BuildBrokenInputDirModules []string `json:",omitempty"`

View File

@@ -264,10 +264,9 @@ func (versionSplitTransitionMutator) Split(ctx android.BaseModuleContext) []stri
variants = append(variants, pyVersion3)
}
if proptools.BoolDefault(props.Version.Py2.Enabled, false) {
if !ctx.DeviceConfig().BuildBrokenUsesSoongPython2Modules() &&
ctx.ModuleName() != "py2-cmd" &&
if ctx.ModuleName() != "py2-cmd" &&
ctx.ModuleName() != "py2-stdlib" {
ctx.PropertyErrorf("version.py2.enabled", "Python 2 is no longer supported, please convert to python 3. This error can be temporarily overridden by setting BUILD_BROKEN_USES_SOONG_PYTHON2_MODULES := true in the product configuration")
ctx.PropertyErrorf("version.py2.enabled", "Python 2 is no longer supported, please convert to python 3.")
}
variants = append(variants, pyVersion2)
}