<#2110 Support equivalent of `pip install --target...
# github-notifications
c
#2110 Support equivalent of `pip install --target=...` to export distributions and source to flat directory Issue created by huonw
pip install
has a `--target`/`-t` option that installs the requested requirements directly to a specific directory, rather than into the usual structure with
site-packages
etc. It would be nice if pexes could support this too. Currently, there's two related
PEX_TOOLS=1
commands, but neither quite do exactly this: • `PEX_TOOLS=1 ./some-pex venv ...`: constructs the full venv structure • `PEX_TOOLS=1 ./some-pex repository extract ...`: only exports the distributions, not the source Motivation: Direct installation like this is handy for building artefacts for certain cases, such as FaaS platforms like Lambda: their docs recommend just splatting all dependencies into the top level of a zip file, along with whatever first party code: https://docs.aws.amazon.com/lambda/latest/dg/python-package.html#python-package-create-package-with-dependency (steps 4-6). More discussion: https://pantsbuild.slack.com/archives/C046T6T9U/p1680247328906249 pantsbuild/pex