Label
A label is used to represent a configured target.
Label.cell
Label.cell: str
For the label fbcode//buck2/hello:world (ovr_config//platform/linux:x86_64-fbcode-46b26edb4b80a905)
this gives back fbcode
Label.cell_root
Label.cell_root: cell_root
Obtain a reference to this target label's cell root. This can be used as if it were an artifact in places that expect one, such as cmd_args().relative_to
.
Label.configured_target
def Label.configured_target(
) -> configured_target_label
Returns the underlying configured target label, dropping the sub target
Label.name
Label.name: str
For the label fbcode//buck2/hello:world (ovr_config//platform/linux:x86_64-fbcode-46b26edb4b80a905)
this gives back world
Label.package
Label.package: str
For the label fbcode//buck2/hello:world (ovr_config//platform/linux:x86_64-fbcode-46b26edb4b80a905)
this gives back buck2/hello
Label.path
Label.path: CellPath
For the label fbcode//buck2/hello:world (ovr_config//platform/linux:x86_64-fbcode-46b26edb4b80a905)
this gives back fbcode/buck2/hello
Label.project_root
Label.project_root: project_root
Obtain a reference to the project's root. This can be used as if it were an artifact in places that expect one, such as cmd_args().relative_to
.
Label.raw_target
def Label.raw_target(
) -> target_label
For the label fbcode//buck2/hello:world (ovr_config//platform/linux:x86_64-fbcode-46b26edb4b80a905)
this returns the unconfigured underlying target label (fbcode//buck2/hello:world
)
Label.sub_target
Label.sub_target: None | list[str]