diff --git a/devtools/TARGETS b/devtools/BUCK similarity index 68% rename from devtools/TARGETS rename to devtools/BUCK index 2236702fbc7..bc1ff53e271 100644 --- a/devtools/TARGETS +++ b/devtools/BUCK @@ -1,8 +1,9 @@ +load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target") load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime") oncall("executorch") -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "lib", srcs = ["__init__.py"], deps = [ diff --git a/devtools/backend_debug/TARGETS b/devtools/backend_debug/BUCK similarity index 76% rename from devtools/backend_debug/TARGETS rename to devtools/backend_debug/BUCK index 00fde3ee3b4..e1b4d77d2c7 100644 --- a/devtools/backend_debug/TARGETS +++ b/devtools/backend_debug/BUCK @@ -1,8 +1,9 @@ +load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target") load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime") oncall("executorch") -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "delegation_info", srcs = [ "__init__.py", diff --git a/devtools/backend_debug/tests/TARGETS b/devtools/backend_debug/tests/BUCK similarity index 76% rename from devtools/backend_debug/tests/TARGETS rename to devtools/backend_debug/tests/BUCK index ae234df8ce4..4e02fff7471 100644 --- a/devtools/backend_debug/tests/TARGETS +++ b/devtools/backend_debug/tests/BUCK @@ -1,8 +1,9 @@ +load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target") load("@fbcode_macros//build_defs:python_unittest.bzl", "python_unittest") oncall("executorch") -python_unittest( +fbcode_target(_kind = python_unittest, name = "test_delegation_info", srcs = [ "test_delegation_info.py", diff --git a/devtools/bundled_program/BUCK b/devtools/bundled_program/BUCK index 0a42614a385..ec6a05df0f2 100644 --- a/devtools/bundled_program/BUCK +++ b/devtools/bundled_program/BUCK @@ -1,5 +1,52 @@ +load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target") load(":targets.bzl", "define_common_targets") oncall("executorch") -define_common_targets() +non_fbcode_target(_kind = define_common_targets,) + +# !!!! fbcode/executorch/devtools/bundled_program/TARGETS was merged into this file, see https://fburl.com/workplace/xl8l9yuo for more info !!!! + +load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime") +load(":targets.bzl", "define_common_targets") + + +fbcode_target(_kind = define_common_targets,) + +fbcode_target(_kind = runtime.python_library, + name = "core", + srcs = [ + "core.py", + ], + visibility = ["PUBLIC"], + deps = [ + ":config", + ":version", + "//caffe2:torch", + "//executorch/devtools/bundled_program/schema:bundled_program_schema_py", + "//executorch/exir:schema", + "//executorch/exir:tensor", + ], +) + +fbcode_target(_kind = runtime.python_library, + name = "config", + srcs = [ + "config.py", + ], + visibility = ["PUBLIC"], + deps = [ + "fbsource//third-party/pypi/typing-extensions:typing-extensions", + "//caffe2:torch", + ], +) + +fbcode_target(_kind = runtime.python_library, + name = "version", + srcs = [ + "version.py", + ], + visibility = [ + "//executorch/devtools/...", + ], +) diff --git a/devtools/bundled_program/TARGETS b/devtools/bundled_program/TARGETS deleted file mode 100644 index 10d4d0b9154..00000000000 --- a/devtools/bundled_program/TARGETS +++ /dev/null @@ -1,44 +0,0 @@ -load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime") -load(":targets.bzl", "define_common_targets") - -oncall("executorch") - -define_common_targets() - -runtime.python_library( - name = "core", - srcs = [ - "core.py", - ], - visibility = ["PUBLIC"], - deps = [ - ":config", - ":version", - "//caffe2:torch", - "//executorch/devtools/bundled_program/schema:bundled_program_schema_py", - "//executorch/exir:schema", - "//executorch/exir:tensor", - ], -) - -runtime.python_library( - name = "config", - srcs = [ - "config.py", - ], - visibility = ["PUBLIC"], - deps = [ - "fbsource//third-party/pypi/typing-extensions:typing-extensions", - "//caffe2:torch", - ], -) - -runtime.python_library( - name = "version", - srcs = [ - "version.py", - ], - visibility = [ - "//executorch/devtools/...", - ], -)