average-breakfast-91545
12/22/2025, 1:09 PMwide-midnight-78598
12/22/2025, 1:11 PMaverage-breakfast-91545
12/22/2025, 1:13 PMaverage-breakfast-91545
12/22/2025, 1:13 PMwide-midnight-78598
12/22/2025, 1:15 PMwide-midnight-78598
12/22/2025, 1:17 PMaverage-breakfast-91545
12/22/2025, 1:17 PMwide-midnight-78598
12/22/2025, 1:18 PMwide-midnight-78598
12/22/2025, 1:19 PMwide-midnight-78598
12/22/2025, 1:21 PMfile can be a local file, or an http_source. So yeah, it can be treated like we do files and resourcesaverage-breakfast-91545
12/22/2025, 1:22 PMwide-midnight-78598
12/22/2025, 1:28 PMhttp_source to grab an image.
https://github.com/sureshjoshi/pants-shell-command-example/blob/75b8f6e9b9222becda8049b6d99d065288c6ecb6/src/BUILD.pants#L46
Nothing new there, but just an exampleripe-leather-69437
12/22/2025, 2:09 PMshell_command but that wasn't running for the package goal so I switched to package_shell_command instead. I thought python would work like any other binary but package_shell_command is timing out running python --version
Before I go down a rabbit hole trying to do a simpler reproduction of the problem: Does anyone know if this is expected to work?wide-midnight-78598
12/22/2025, 2:18 PMripe-leather-69437
12/22/2025, 2:27 PMripe-leather-69437
12/22/2025, 2:28 PMaverage-breakfast-91545
12/22/2025, 2:30 PMwide-midnight-78598
12/22/2025, 2:41 PMwide-midnight-78598
12/22/2025, 2:43 PMripe-leather-69437
12/22/2025, 2:56 PMpackage_shell_command(
name="model_download",
command="exec -a $0 python model_download.py --out output --model-name foo",
tools=["python", "bash"],
output_directories=["output/"],
execution_dependencies=["model_download.py"],
log_output=True,
)
# BUILD
#############
shell_sources(name="scripts")
package_shell_command(
name="model_download_shell",
command="./test.sh",
tools=["bash", "aws", "which", "touch", "python"],
output_directories=["output/"],
log_output=True,
)
# test.sh
#############
#!/bin/bash
echo 'This is a test'
which python
python --version
You can see in the shell variation I was just trying to get anything python flavoured to workwide-midnight-78598
12/22/2025, 2:57 PMripe-leather-69437
12/22/2025, 2:57 PMwide-midnight-78598
12/22/2025, 2:58 PMwide-midnight-78598
12/22/2025, 2:59 PMwide-midnight-78598
12/22/2025, 3:01 PMtree
|____src
| |____main.py
| |____downloader.sh
| |____BUILD.pants
| |____download-file.py
| |______init__.py
|____build-support
| |____lockfiles
| | |____python-default.lock
|____BUILD.pants
|____README.md
|____pants.toml
|____requirements.txt
|____LICENSEwide-midnight-78598
12/22/2025, 3:01 PMwide-midnight-78598
12/22/2025, 3:03 PMwide-midnight-78598
12/22/2025, 3:04 PMwide-midnight-78598
12/22/2025, 3:05 PMripe-leather-69437
12/22/2025, 3:05 PMwide-midnight-78598
12/22/2025, 3:07 PMripe-leather-69437
12/22/2025, 3:18 PMbash into the tool list and then I got the same timeout error:
Process 'the `shell_command` at `src/service/edge/models/download:run-download`' failed with exit code -15.
stdout:
stderr:
Exceeded timeout of 30.0 seconds when executing local process: Running the `shell_command` at `src/service/edge/models/download:run-download`
It didn't even print the python version 🤔ripe-leather-69437
12/22/2025, 3:21 PM#!/bin/bash
exec "/Users/ryanloader/.pyenv/shims/python3" "$@"ripe-leather-69437
12/22/2025, 3:26 PMwide-midnight-78598
12/22/2025, 3:48 PMtools field doesnt match some of the other locationsripe-leather-69437
12/22/2025, 4:27 PM$ env | grep PYENV
PYENV_ROOT=/Users/ryanloader/.pyenv
PYENV_SHELL=zsh
PYENV_VERSION=inference
Unfortunately it doesn't link a version explicitly in there because there's another level of indirection:
$ ls ~/.pyenv/versions/
3.11.14 inference ingest servewide-midnight-78598
12/22/2025, 9:11 PM