cool-easter-32542
04/04/2023, 9:10 PMpython_source(
name='lib-hello',
source='hello.py')
pex_binary(
name="hi",
entry_point="hello.py",
)
adhoc_tool(
name="local-data",
runnable=":hi",
args=["--foo"],
output_directories=["data"],
log_output=True,
)
python_source(
name='lib-world',
source='world.py',
dependencies=[':local-data']
)
Results in
$ pants --keep-sandboxes=on_failure run hello_pex/world.py
17:07:27.22 [INFO] Preserving local process execution dir /tmp/pants-sandbox-LcNOLX for Running the `adhoc_tool` at hello_pex:local-data
17:07:27.22 [INFO] Completed: Running the `adhoc_tool` at hello_pex:local-data
17:07:27.22 [ERROR] 1 Exception encountered:
Engine traceback:
in `run` goal
ProcessExecutionFailure: Process 'the `adhoc_tool` at hello_pex:local-data' failed with exit code 127.
stdout:
stderr:
/usr/bin/env: 'python3.9': No such file or directory
Confusingly, the __run.sh from the sandbox runs without error when invoked directly. so I'm not sure what is going on here.
Pants version
2.16.0a0, 2.16.0rc0
OS
Linux
Additional info
https://github.com/cburroughs/example-adhoc/tree/ad-hoc-pex
pantsbuild/pantscool-easter-32542
04/07/2023, 6:09 PM