Label
A label is used to represent a configured target.
Label.cell
Label.cell: strFor the label fbcode//buck2/hello:world (ovr_config//platform/linux:x86_64-fbcode-46b26edb4b80a905) this gives back fbcode
Label.cell_root
Label.cell_root: CellRootObtain 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(
) -> ConfiguredTargetLabelReturns the underlying configured target label, dropping the sub target
Label.name
Label.name: strFor the label fbcode//buck2/hello:world (ovr_config//platform/linux:x86_64-fbcode-46b26edb4b80a905) this gives back world
Label.package
Label.package: strFor the label fbcode//buck2/hello:world (ovr_config//platform/linux:x86_64-fbcode-46b26edb4b80a905) this gives back buck2/hello
Label.package_path
Label.package_path: PackagePathReturns the PackagePath for this configured providers label.
Label.path
Label.path: CellPathFor 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: ProjectRootObtain 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(
) -> TargetLabelFor 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]