abundant-autumn-67998
12/14/2022, 7:56 PM--include-tools
or --venv
? I found a roundabout way to do this, is there something simpler?
pex --include-tools -o just-tools.pex
PEX_TOOLS=1 PEX_PATH=the-pex-without-tools.pex ./just-tools.pex venv my-venv
While can build our user's newer pexes with --include-tools
, we also need to support their older pexes which were not built with tools.enough-analyst-54434
12/14/2022, 7:57 PMpex
, pex3
and pex-tools
. It's then pex-tools any.pex ...
pex
console script or the Pex PEX?abundant-autumn-67998
12/14/2022, 8:00 PMpex
console script during build. i think we install pex
in the run environment as well so pex-tools
should be available.enough-analyst-54434
12/14/2022, 8:01 PMjsirois@Gill-Windows:~ $ curl -fsLO <https://github.com/pantsbuild/pex/releases/download/v2.1.118/pex>
jsirois@Gill-Windows:~ $ chmod +x pex
jsirois@Gill-Windows:~ $ ./pex cowsay -ccowsay -ocowsay.pex
jsirois@Gill-Windows:~ $ PEX_SCRIPT=pex-tools ./pex cowsay.pex venv here
jsirois@Gill-Windows:~ $ here/pex 'Moo!'
____
| Moo! |
====
\
\
^__^
(oo)\_______
(__)\ )\/\
||----w |
|| ||
abundant-autumn-67998
12/14/2022, 8:03 PM/usr/local/bin/pex-tools
in our runtime environment so I can just use that.enough-analyst-54434
12/14/2022, 8:03 PM--python this/one/here/python
etc options when you operate using the generic tools.--interpreter-constraint
embedded in the PEX file you're operating against, but if you don't use --interpreter-constraint
care may be needed depending on your environment.abundant-autumn-67998
12/14/2022, 8:12 PM--python=
but not --interpreter-constraint=
. at least currently we only have one python in each runtime image and have separate images for different python versions.