purple-plastic-57801
05/16/2023, 12:07 AMbroad-processor-92400
05/16/2023, 12:10 AMadhoc_tool
can run pip packages (2.16, in the pants.backend.experimental.adhoc
backend), e.g. potentially something like adhoc_tool(runnable="path/to:meson", ...)
where that's the address of the meson
python_requirement
purple-plastic-57801
05/16/2023, 12:28 AMadhoc_tool(
name = "meson",
runnable=".build/requirements:reqs-libcamera#meson",
)
run_shell_command(
name="run-meson",
command="version",
runnable_dependencies=[":meson"],
)
pants run .build:run-meson
17:30:17.65 [ERROR] 1 Exception encountered:
Engine traceback:
in `run` goal
ValueError: Address `.build:meson` was specified as a runnable dependency, but is not
runnable.
broad-processor-92400
05/16/2023, 12:30 AMadhoc_tool
actually runs the dependency, similar to shell_command
, just with deeper knowledge of how to set-up and run python deps or similar, so that might need to be:
adhoc_tool(
name="meson-output",
runnable="...",
args=["version"],
)
Like shell_command
, adhoc_tool
is for codegen though, so `output_files`/`output_directories` is importantpurple-plastic-57801
05/16/2023, 12:31 AMbroad-processor-92400
05/16/2023, 12:32 AM.build/requirements:reqs-libcamera#meson"
as a runnable_dependency
to `shell_command`/`run_shell_command` would also work, e.g.
run_shell_command(command="meson version", runnable_dependencies=[".build/requirements:reqs-libcamera#meson"])
I don't know exactly the name that that dep will appear on PATH
, though (e.g. it could be called reqs-libcamera#meson
literally, I think).purple-plastic-57801
05/16/2023, 12:34 AMpants run .build:ruuun-meson
1.0.1
run_shell_command(
name="ruuun-meson",
command="meson --version",
runnable_dependencies=[".build/requirements:reqs-libcamera#meson"]
)
broad-processor-92400
05/16/2023, 12:34 AMpurple-plastic-57801
05/16/2023, 12:43 AM