80 lines
3.2 KiB
Diff
80 lines
3.2 KiB
Diff
From: uazo <uazo@users.noreply.github.com>
|
|
Date: Fri, 2 May 2025 14:16:01 +0000
|
|
Subject: Force use vpython3 for some scripts
|
|
|
|
Some scripts need the latest version of python not available in the docker container.
|
|
The patch forces the use of python in the virtual environment in the version
|
|
required by the chromium build tools.
|
|
|
|
License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
|
|
---
|
|
components/search_engines/BUILD.gn | 4 +++-
|
|
components/variations/field_trial_config/BUILD.gn | 4 +++-
|
|
tools/json_to_struct/json_to_struct.gni | 4 +++-
|
|
3 files changed, 9 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/components/search_engines/BUILD.gn b/components/search_engines/BUILD.gn
|
|
--- a/components/search_engines/BUILD.gn
|
|
+++ b/components/search_engines/BUILD.gn
|
|
@@ -298,7 +298,7 @@ component("search_engines_switches") {
|
|
|
|
if (!is_android) {
|
|
action("generate_search_engine_icons") {
|
|
- script = "//tools/search_engine_choice/generate_search_engine_icons.py"
|
|
+ script = "//build/gn_run_binary.py"
|
|
|
|
inputs = [
|
|
"//tools/search_engine_choice/generate_search_engine_icons_config.json",
|
|
@@ -315,6 +315,8 @@ if (!is_android) {
|
|
]
|
|
|
|
args = [
|
|
+ rebase_path("//third_party/depot_tools/vpython3"),
|
|
+ rebase_path("//tools/search_engine_choice/generate_search_engine_icons.py"),
|
|
rebase_path("//", root_build_dir),
|
|
rebase_path("$target_gen_dir/generated_search_engine_resource_ids-inc.cc",
|
|
root_build_dir),
|
|
diff --git a/components/variations/field_trial_config/BUILD.gn b/components/variations/field_trial_config/BUILD.gn
|
|
--- a/components/variations/field_trial_config/BUILD.gn
|
|
+++ b/components/variations/field_trial_config/BUILD.gn
|
|
@@ -5,7 +5,7 @@ import("//tools/json_to_struct/json_to_struct.gni")
|
|
|
|
action("field_trial_testing_config_action") {
|
|
visibility = [ ":field_trial_config" ]
|
|
- script = "//tools/variations/fieldtrial_to_struct.py"
|
|
+ script = "//build/gn_run_binary.py"
|
|
|
|
source = "//testing/variations/fieldtrial_testing_config.json"
|
|
inputs = JSON_TO_STRUCT_FILES + [ source ]
|
|
@@ -22,6 +22,8 @@ action("field_trial_testing_config_action") {
|
|
}
|
|
|
|
args = [
|
|
+ rebase_path("//third_party/depot_tools/vpython3"),
|
|
+ rebase_path("//tools/variations/fieldtrial_to_struct.py"),
|
|
rebase_path(source, root_build_dir),
|
|
"--destbase=" + rebase_path(target_gen_dir, root_build_dir),
|
|
"--namespace=variations",
|
|
diff --git a/tools/json_to_struct/json_to_struct.gni b/tools/json_to_struct/json_to_struct.gni
|
|
--- a/tools/json_to_struct/json_to_struct.gni
|
|
+++ b/tools/json_to_struct/json_to_struct.gni
|
|
@@ -41,7 +41,7 @@ template("json_to_struct") {
|
|
|
|
action(action_name) {
|
|
visibility = [ ":$source_set_name" ]
|
|
- script = "//tools/json_to_struct/json_to_struct.py"
|
|
+ script = "//build/gn_run_binary.py"
|
|
|
|
inputs = JSON_TO_STRUCT_FILES + [
|
|
invoker.source,
|
|
@@ -56,6 +56,8 @@ template("json_to_struct") {
|
|
]
|
|
|
|
args = [
|
|
+ rebase_path("//third_party/depot_tools/vpython3"),
|
|
+ rebase_path("//tools/json_to_struct/json_to_struct.py"),
|
|
rebase_path(invoker.source, root_build_dir),
|
|
"--destbase=" + rebase_path(out_dir, root_build_dir),
|
|
"--namespace=" + invoker.namespace,
|
|
--
|