hundreds-father-404
05/27/2020, 12:00 AMrun
so that source file changes don’t require rebuilding the PEX. That is, we would stop bundling sources
into the PEX itself, and only populate it in the chroot and run the requirements PEX against those loose files. In command line terms, something like running $ ./requirements.pex app.py
.
I couldn’t figure it out. Issues with discovering the module, and I think not setting the entry_point
properly.
Should this be possible to generalize for any arbitrary set of source files + arbitrary entry point?enough-analyst-54434
05/27/2020, 12:27 AM$ pex requests -o requests.pex
$ mkdir -p a/package
$ echo 'import requests; print(requests.__file__)' > a/package/module.py
You do this like so:
$ PYTHONPATH=. PEX_INHERIT_PATH=fallback PEX_MODULE=a.package.module ./requests.pex
/usr/lib/python3.8/site-packages/requests/__init__.py
Note the unfortunate leak though.RunnableBinary
and then have backends that support a binary optimized for local runs produce something special - pex could create an otherwise empty PEX_PATH pex that composes a requirements PEX and sources PEX and backends that don't support this could just provide an identity rule that Get[CreatedBinary]
and outputs an unaltered RunnableBinary
If there is a way to default the identity rule that would be great.RunnbaleBinary
instead of CreatedBinary
...hundreds-father-404
05/27/2020, 12:42 AMenough-analyst-54434
05/27/2020, 12:47 AMhundreds-father-404
05/27/2020, 12:50 AMenough-analyst-54434
05/27/2020, 12:52 AM--unzip
for the pylint issue?hundreds-father-404
05/27/2020, 12:54 AM