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: I4193767a6a72a527eeca56fbabe477bee9e21c7a
This commit is contained in:
Cole Faust
2024-09-09 18:08:01 -07:00
parent 492eea80d9
commit f72ec7ae1d
3 changed files with 4 additions and 10 deletions

View File

@@ -43,14 +43,9 @@ within a product configuration .mk file, board config .mk file, or buildspec.mk.
The path set when running builds now makes the `python` executable point to python 3, The path set when running builds now makes the `python` executable point to python 3,
whereas on previous versions it pointed to python 2. If you still have python 2 scripts, whereas on previous versions it pointed to python 2. If you still have python 2 scripts,
you can change the shebang line to use `python2` explicitly. This only applies for you can change the shebang line to use `python2` explicitly. This only applies for
scripts run directly from makefiles, or from soong genrules. This behavior can be scripts run directly from makefiles, or from soong genrules.
temporarily overridden by setting the `BUILD_BROKEN_PYTHON_IS_PYTHON2` environment
variable to `true`. It's only an environment variable and not a product config variable
because product config sometimes calls python code.
In addition, `python_*` soong modules no longer allow python 2. This can be temporarily In addition, `python_*` soong modules no longer allow python 2.
overridden by setting the `BUILD_BROKEN_USES_SOONG_PYTHON2_MODULES` product configuration
variable to `true`.
Python 2 is slated for complete removal in V. Python 2 is slated for complete removal in V.

View File

@@ -173,6 +173,7 @@ $(KATI_obsolete_var BOARD_PREBUILT_PVMFWIMAGE,pvmfw.bin is now built in AOSP and
$(KATI_obsolete_var BUILDING_PVMFW_IMAGE,BUILDING_PVMFW_IMAGE is no longer used) $(KATI_obsolete_var BUILDING_PVMFW_IMAGE,BUILDING_PVMFW_IMAGE is no longer used)
$(KATI_obsolete_var BOARD_BUILD_SYSTEM_ROOT_IMAGE) $(KATI_obsolete_var BOARD_BUILD_SYSTEM_ROOT_IMAGE)
$(KATI_obsolete_var FS_GET_STATS) $(KATI_obsolete_var FS_GET_STATS)
$(KATI_obsolete_var BUILD_BROKEN_USES_SOONG_PYTHON2_MODULES)
# Used to force goals to build. Only use for conditionally defined goals. # Used to force goals to build. Only use for conditionally defined goals.
.PHONY: FORCE .PHONY: FORCE
@@ -363,8 +364,7 @@ endif
# configs, generally for cross-cutting features. # configs, generally for cross-cutting features.
# Build broken variables that should be treated as booleans # Build broken variables that should be treated as booleans
_build_broken_bool_vars := \ _build_broken_bool_vars :=
BUILD_BROKEN_USES_SOONG_PYTHON2_MODULES \
# Build broken variables that should be treated as lists # Build broken variables that should be treated as lists
_build_broken_list_vars := \ _build_broken_list_vars := \

View File

@@ -286,7 +286,6 @@ $(call add_json_bool, BuildBrokenClangCFlags, $(filter true,$(BUILD
$(call add_json_bool, GenruleSandboxing, $(if $(GENRULE_SANDBOXING),$(filter true,$(GENRULE_SANDBOXING)),$(if $(filter true,$(BUILD_BROKEN_GENRULE_SANDBOXING)),,true))) $(call add_json_bool, GenruleSandboxing, $(if $(GENRULE_SANDBOXING),$(filter true,$(GENRULE_SANDBOXING)),$(if $(filter true,$(BUILD_BROKEN_GENRULE_SANDBOXING)),,true)))
$(call add_json_bool, BuildBrokenEnforceSyspropOwner, $(filter true,$(BUILD_BROKEN_ENFORCE_SYSPROP_OWNER))) $(call add_json_bool, BuildBrokenEnforceSyspropOwner, $(filter true,$(BUILD_BROKEN_ENFORCE_SYSPROP_OWNER)))
$(call add_json_bool, BuildBrokenTrebleSyspropNeverallow, $(filter true,$(BUILD_BROKEN_TREBLE_SYSPROP_NEVERALLOW))) $(call add_json_bool, BuildBrokenTrebleSyspropNeverallow, $(filter true,$(BUILD_BROKEN_TREBLE_SYSPROP_NEVERALLOW)))
$(call add_json_bool, BuildBrokenUsesSoongPython2Modules, $(filter true,$(BUILD_BROKEN_USES_SOONG_PYTHON2_MODULES)))
$(call add_json_bool, BuildBrokenVendorPropertyNamespace, $(filter true,$(BUILD_BROKEN_VENDOR_PROPERTY_NAMESPACE))) $(call add_json_bool, BuildBrokenVendorPropertyNamespace, $(filter true,$(BUILD_BROKEN_VENDOR_PROPERTY_NAMESPACE)))
$(call add_json_bool, BuildBrokenIncorrectPartitionImages, $(filter true,$(BUILD_BROKEN_INCORRECT_PARTITION_IMAGES))) $(call add_json_bool, BuildBrokenIncorrectPartitionImages, $(filter true,$(BUILD_BROKEN_INCORRECT_PARTITION_IMAGES)))
$(call add_json_list, BuildBrokenInputDirModules, $(BUILD_BROKEN_INPUT_DIR_MODULES)) $(call add_json_list, BuildBrokenInputDirModules, $(BUILD_BROKEN_INPUT_DIR_MODULES))