label
type
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]