https://pantsbuild.org/ logo
#general
Title
# general
n

nice-florist-55958

11/13/2021, 5:51 PM
Is there an option to change the pex build hashbang from #!usr/bin/env pyton to a pre-specified one (or set to the Python version resolved by Pants when running the goal (it is on AFS and so accessible outside of Pants' env)).
Well specifically if it's a
pex_binary
target. Which PEX are you referring to?
🙌 1
n

nice-florist-55958

11/13/2021, 6:00 PM
Exactly what I wanted. I was sadly looking in the wrong place (https://www.pantsbuild.org/docs/reference-pex-binary-defaults)
Can this be placed in pants.toml instead of always passing as cmdline arg? Getting errors when using [pex-binary] scope.
Looks like options on targets must be specified in the BUILD files? Global, goals and subsystems in pants.toml.
h

hundreds-father-404

11/13/2021, 6:20 PM
Yes, that is correct. BUILD files are for decentralized localized config (targets)
h

happy-kitchen-89482

11/14/2021, 12:31 AM
If you need to do this on many targets, you can create a macro to spare you the typing.
3 Views