-
-
Notifications
You must be signed in to change notification settings - Fork 264
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 injecting args and env vars in a PEX. #1948
Conversation
Pex now supports setting defaults for environment variables and injecting default arguments for the entry point chosen at PEX build time. This eliminates the need for projects like https://github.com/kwlzn/pyuwsgi_pex and makes it easy to package a PEXed framework app where the main entry point is fixed in the framework and the hooks are configured to point to user supplied entry points. This removes the last known legitimate API use of Pex and paves the way for Pex 3 to be cut in good conscience with a CLI-only API that does not hinder any known use cases. Fixes pex-tool#987
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should there be support for this in sh-booted venvs?
With respect to blocker for a 3.0 pex release being unblocked I think #1907 is related to what you are saying. I still owe you a reproducible issue with the current CLI.
There is. There are only 2 Pex runtime entry points, |
Re #1907, great. Get me info and it gets fixed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for clarifying!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent!
Pex now supports setting defaults for environment variables and
injecting default arguments for the entry point chosen at PEX build
time. This eliminates the need for projects like
https://github.com/kwlzn/pyuwsgi_pex and makes it easy to package a
PEXed framework app where the main entry point is fixed in the framework
and the hooks are configured to point to user supplied entry points.
The
__pex__
import hook introduced in #1845 removed the need forprojects like https://github.com/pantsbuild/lambdex. This change removes
the last known legitimate API use of Pex and paves the way for Pex 3 to
be cut in good conscience with a CLI-only API that does not hinder any
known use cases.
Fixes #987