Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4ce4f889 authored by Cole Faust's avatar Cole Faust
Browse files

Remove BUILD_BROKEN_USES_SOONG_PYTHON2_MODULES

It's been available for over a year, lets progress the python3 migration
by removing it.

Bug: 203436762
Test: Presubmits
Change-Id: I46a6477ec65e98b7e6df5cc1359f676dcbd0f08e
parent 219009f6
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -1823,10 +1823,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
}
+0 −1
Original line number Diff line number Diff line
@@ -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"`
+2 −3
Original line number Diff line number Diff line
@@ -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)
		}