-
-
Notifications
You must be signed in to change notification settings - Fork 259
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support equivalent of pip install --target=...
to export distributions and source to flat directory
#2110
Comments
Looking at the code that handles this in This would suggest to me that, for a lot of use cases, just doing a venv export and then copying out the |
Just noting a correction to the claims above. I think the feature still makes sense.
This is not true. There is a |
This is getting tacked on to the feature work for #1752. There will be a |
This command allows inspecting venvs created by Pex as well as those created by other tools. Work towards pex-tool#1752 and pex-tool#2110
This code as well as selection of a unique target to resolve for will be re-used by the forthcoming `pex3 venv create` command. Along the way, clean up confusion noted in pex-tool#2135 in the introduction of the `pex3 venv` subcommand surrounding `pyvenv.cfg` files generated by `Virtualenv`. Work towards pex-tool#1752 and pex-tool#2110.
This code as well as selection of a unique target to resolve for will be re-used by the forthcoming `pex3 venv create` command. Along the way, clean up confusion noted in #2135 in the introduction of the `pex3 venv` sub-command surrounding `pyvenv.cfg` files generated by `Virtualenv`. Work towards #1752 and #2110.
This new subcommand can create either a venv or just populate a flat `sys.path` directory entry (ala `pip install --target`) given a set of requirements to resolve, potentially from a lock or an existing PEX file, but otherwise from indexes and find links repos. Unlike the sibling `venv` `pex-tool` subcommand, the target can be selected and, in the flat `sys.path` directory entry case, it can be a foreign platform. Fixes pex-tool#1752 Fixes pex-tool#2110
This new subcommand can create either a venv or just populate a flat `sys.path` directory entry (ala `pip install --target`) given a set of requirements to resolve, potentially from a lock or an existing PEX file, but otherwise from indexes and find links repos. Unlike the sibling `venv` `pex-tool` subcommand, the target can be selected and, in the flat `sys.path` directory entry case, it can be a foreign platform. Fixes pex-tool#1752 Fixes pex-tool#2110
This new sub-command can create either a venv or just populate a flat `sys.path` directory entry (ala `pip install --target`) given a set of requirements to resolve, potentially from a lock or an existing PEX file, but otherwise from indexes and find links repos. Unlike the sibling `venv` `pex-tool` sub-command, the target can be selected and, in the flat `sys.path` directory entry case, it can be a foreign platform. Fixes #1752 Fixes #2110 Fixes #2111
pip install
has a--target
/-t
option that installs the requested requirements directly to a specific directory, rather than into the usual structure withsite-packages
etc. It would be nice if pexes could support this too. Currently, there's two relatedPEX_TOOLS=1
commands, but neither quite do exactly this:PEX_TOOLS=1 ./some-pex venv ...
: constructs the full venv structurePEX_TOOLS=1 ./some-pex repository extract ...
: only exports the distributions, not the sourceMotivation: 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
The text was updated successfully, but these errors were encountered: