plain-carpet-73994
10/20/2021, 10:50 PMPYTHONPATH=$(echo $(pwd)/.deps/* | tr ' ' ':') python -m device.session.main
but that's a bit ugly and I don't know how to convert that back to a .pex
easily (I think I could figure out some flags to tell it to use the .deps
, not to check pypi
, etc. but is there an easier way?happy-kitchen-89482
10/20/2021, 10:55 PMpex
tool takes a --layout
flag, with one of the values {zipapp,packed,loose}
. You're building a zipapp (which is the default) but you might want to try packed
or loose
, which will create a directory instead.packed
and loose
is, from the help:--layout {zipapp,packed,loose}
By default, a PEX is created as a single file zipapp when `-o` is specified, but either a packed or loose directory tree based layout can be chosen instead. A packed layout PEX is an executable directory
structure designed to have cache-friendly characteristics for syncing incremental updates to PEXed applications over a network. At the top level of the packed directory tree there is an executable
`__main__.py`script. The directory can also be executed by passing its path to a Python executable; e.g: `python packed-pex-dir/`. The Pex bootstrap code and all dependency code are packed into individual zip
files for efficient caching and syncing. A loose layout PEX is similar to a packed PEX, except that neither the Pex bootstrap code nor the dependency code are packed into zip files, but are instead present as
collections of loose files in the directory tree providing different caching and syncing tradeoffs. Both zipapp and packed layouts install themselves in the PEX_ROOT as loose apps by default before executing,
but these layouts compose with `--venv` execution mode as well and support `--seed`ing. (default: zipapp)
pex_binary
target, you can set execution_mode
on the pex_binary
to venv
- you still get a single file in dist, but when you execute it, it first splats itself out into a venv, and then you can tinker inside that venvplain-carpet-73994
10/20/2021, 11:02 PM