alert-psychiatrist-14102
08/06/2023, 12:44 PMscript.sh
./proj/main.py | ./proj/main2.py | ./proj/main3.py
How can i achieve this with pants?
(We looked at shell_source
, but it does not appear to be a runnable target. Also shunit2_test is almost what we need, except this is not a test in our case)bitter-ability-32190
08/06/2023, 1:47 PMacoustic-house-77496
08/06/2023, 3:12 PMalert-psychiatrist-14102
08/06/2023, 3:18 PMalert-psychiatrist-14102
08/06/2023, 3:18 PMbitter-ability-32190
08/06/2023, 3:20 PMacoustic-house-77496
08/06/2023, 3:21 PMacoustic-house-77496
08/06/2023, 3:22 PMalert-psychiatrist-14102
08/06/2023, 3:23 PMacoustic-house-77496
08/06/2023, 3:24 PMalert-psychiatrist-14102
08/06/2023, 3:36 PMbitter-ability-32190
08/06/2023, 3:44 PMbitter-ability-32190
08/06/2023, 3:44 PMrun_shell_command
would be your runnable thing for shellalert-psychiatrist-14102
08/06/2023, 8:56 PMrun_shell_command
worked. The key was to use CHROOT
which i previously missed.alert-psychiatrist-14102
08/06/2023, 8:57 PMshell_soutces
makes more sense to me now, given the context you added.broad-processor-92400
08/06/2023, 11:50 PMrunnable_dependencies
https://www.pantsbuild.org/docs/reference-run_shell_command#coderunnable_dependenciescode as part of run_shell_command
alert-psychiatrist-14102
08/07/2023, 8:45 AMpex_binary
cannot be specified as a runnable_dependency
..
Output:
❯ pants run stimulus/flask_server:my_script
11:40:27.52 [ERROR] 1 Exception encountered:
Engine traceback:
in `run` goal
ValueError: Address `stimulus/flask_server:app` was specified as a runnable dependency, but is not
runnable.
BUILD.pants:
python_sources()
pex_binary(
name="app",
entry_point="server.py",
)
shell_sources(name="shell-scripts")
run_shell_command(
name="my_script",
command="my-script.sh",
runnable_dependencies=[":shell-scripts", ":app"]
)