diff --git a/changes/2422.misc.md b/changes/2422.misc.md new file mode 100644 index 0000000000..10af65eac1 --- /dev/null +++ b/changes/2422.misc.md @@ -0,0 +1 @@ +Add PEX, SCIE binary build configs for the plugin subsystem. diff --git a/src/ai/backend/cli/BUILD b/src/ai/backend/cli/BUILD index 979bcff803..07194297b2 100644 --- a/src/ai/backend/cli/BUILD +++ b/src/ai/backend/cli/BUILD @@ -14,6 +14,7 @@ visibility_private_component( "//src/ai/backend/web/**", "//src/ai/backend/install/**", "//src/ai/backend/wsproxy/**", + "//src/ai/backend/plugin/**", ], allowed_dependencies=[ "//src/ai/backend/plugin/**", diff --git a/src/ai/backend/plugin/BUILD b/src/ai/backend/plugin/BUILD index 14d7f12400..f375baf14e 100644 --- a/src/ai/backend/plugin/BUILD +++ b/src/ai/backend/plugin/BUILD @@ -18,7 +18,9 @@ visibility_private_component( "//src/ai/backend/testutils/**", "//src/ai/backend/install/**", ], - allowed_dependencies=[], + allowed_dependencies=[ + "//src/ai/backend/cli/**", + ], ) python_distribution( @@ -52,3 +54,29 @@ resources( "**/py.typed", ], ) + +pex_binary( + name="pex", + entry_point="ai.backend.cli.__main__", + dependencies=[ + ":src", + ":buildscript", + "!!stubs/trafaret:stubs", + ], +) + +scie_binary( + name="backendai-plugin", + fat=False, + dependencies=[":pex"], + tags=["scie", "lazy"], +) + +scie_binary( + name="backendai-plugin-fat", + fat=True, + dependencies=[":pex"], + tags=["scie", "fat"], +) + +resource(name="buildscript", source="BUILD")