Anybody using PEX in the wild have some tips on ho...
# general
f
Anybody using PEX in the wild have some tips on how they handle metadata relevant for distributions? I'm talking exposing versions, signatures, etc to tooling. I assume you might just embed it in some kinda format that supports that like a distro package or a container, but maybe there are ways to embed that in PEX since it's just a zip file?
include_tools
seems useful at least
g
Might be the "wrong" direction for you but we have Python scripts that script Pants workflows; and they do things like
pants publish --publish-output=artifacts.json ....
. That metadata we then publish to other sources, primarily our internal builds database which other tools pull from.
f
yeah that sounds about right... so it's just a home grown solution
I'm also kinda looking at Scie for this (Pants now uses scie to ship Pants)... it has a neat property of being an executable that also ships its metadata as the last "line"... such that
Copy code
tail -1 my-scie | jq .
is useful output, although I don't know how much control I have there
e
You have control if you use science to build your scie (scie-pants does). See `science lift --app-info... build`: https://science.scie.app/cli.html#science-lift And the scie-pants example here: https://github.com/pantsbuild/scie-pants/blob/622df25b71c054fc0a7c58613d596e7e02bfcb88/package/scie-pants.toml#L6 And you can view this in action via
SCIE=inspect pants | jq .science
for the latest scie-pants version.
👍🏻 1
f
Awesome! Is
SCIE=inspect $scie
any different from
tail -1 $scie
?
e
No, except that inspect always works and the tail trick only works if the scie was built with --single-lift-line.