From 04857276a8a5857a2312b58c503c8c62009895f0 Mon Sep 17 00:00:00 2001 From: Abel Valadez Date: Tue, 4 Jun 2024 08:38:27 -0700 Subject: [PATCH] Make copy resources default for python_bootstrap --- prelude/cxx/tools/BUCK.v2 | 24 +++--------------------- prelude/python_bootstrap/tools/BUCK.v2 | 10 ++-------- prelude/rules_impl.bzl | 2 +- 3 files changed, 6 insertions(+), 30 deletions(-) diff --git a/prelude/cxx/tools/BUCK.v2 b/prelude/cxx/tools/BUCK.v2 index 2748823e9e584..8ca3c303bed68 100644 --- a/prelude/cxx/tools/BUCK.v2 +++ b/prelude/cxx/tools/BUCK.v2 @@ -22,27 +22,15 @@ prelude.command_alias( visibility = ["PUBLIC"], ) -prelude.export_file( - name = "make_comp_db.py", - src = "make_comp_db.py", - visibility = ["PUBLIC"], -) - prelude.python_bootstrap_binary( name = "make_comp_db", - main = ":make_comp_db.py", - visibility = ["PUBLIC"], -) - -prelude.export_file( - name = "dep_file_processor.py", - src = "dep_file_processor.py", + main = "make_comp_db.py", visibility = ["PUBLIC"], ) prelude.python_bootstrap_binary( name = "dep_file_processor", - main = ":dep_file_processor.py", + main = "dep_file_processor.py", visibility = ["PUBLIC"], deps = [ ":dep_file_processors", @@ -60,15 +48,9 @@ prelude.python_bootstrap_library( visibility = ["PUBLIC"], ) -prelude.export_file( - name = "linker_wrapper.py", - src = "linker_wrapper.py", - visibility = ["PUBLIC"], -) - prelude.python_bootstrap_binary( name = "linker_wrapper", - main = ":linker_wrapper.py", + main = "linker_wrapper.py", visibility = ["PUBLIC"], ) diff --git a/prelude/python_bootstrap/tools/BUCK.v2 b/prelude/python_bootstrap/tools/BUCK.v2 index b5863cf80682a..ad7248eb054f8 100644 --- a/prelude/python_bootstrap/tools/BUCK.v2 +++ b/prelude/python_bootstrap/tools/BUCK.v2 @@ -6,16 +6,10 @@ source_listing() prelude = native -prelude.export_file( - name = "win_python_wrapper.bat", - src = "win_python_wrapper.bat", - target_compatible_with = ["config//os:windows"], - visibility = ["PUBLIC"], -) - prelude.sh_binary( name = "win_python_wrapper", - main = ":win_python_wrapper.bat", + main = "win_python_wrapper.bat", + copy_resources = True, target_compatible_with = ["config//os:windows"], visibility = ["PUBLIC"], ) diff --git a/prelude/rules_impl.bzl b/prelude/rules_impl.bzl index 1c43fcadf4b6f..edce997b6e228 100644 --- a/prelude/rules_impl.bzl +++ b/prelude/rules_impl.bzl @@ -558,7 +558,7 @@ inlined_extra_attributes = { "python_bootstrap_binary": { "deps": attrs.list(attrs.dep(providers = [PythonBootstrapSources]), default = []), "main": attrs.source(), - "copy_deps": attrs.bool(default = False), + "copy_deps": attrs.bool(default = True), "_exec_os_type": buck.exec_os_type_arg(), "_python_bootstrap_toolchain": toolchains_common.python_bootstrap(), "_win_python_wrapper": attrs.default_only(