-
-
Notifications
You must be signed in to change notification settings - Fork 292
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
Re-exec with interpreter-options when set. (#1745) #1746
Conversation
9b1691a
to
8e34f12
Compare
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 Loren. I really appreciate you stopping by at PyCon and chipping in. The comments are not worth addressing unless there is a natural opportunity like CI failures. I'll merge if all is green.
Restart the process passing the given options to the python interpreter | ||
""" | ||
# Find the pex bootstrap location | ||
# We expect this environment variable to be set by __main__.py |
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.
This comment is a bit stale and needs adjustment.
) | ||
os.execv(interpreter, cmdline) | ||
else: | ||
return "Unable to resolve pex path" |
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.
This should be impossible; so its not very important except for the code reader, but it would be spot on if it said "Unable to resolve installed pex path".
Apply @BrandonTheBuilder's work in pex-tool#1746 to the `--venv` case and flesh out complete support for Python interpreter emulation by adding `.` to the `sys.path` when running as an interpreter and handling interpreter execution of directories. Fixes pex-tool#1745
Apply @BrandonTheBuilder's work in pex-tool#1746 to the `--venv` case and flesh out complete support for Python interpreter emulation by adding `.` to the `sys.path` when running as an interpreter and handling interpreter execution of directories. Fixes pex-tool#1745
Apply @BrandonTheBuilder's work in #1746 to the `--venv` case and flesh out complete support for Python interpreter emulation by adding `.` to the `sys.path` when running as an interpreter and handling interpreter execution of directories. Fixes #1745
Parse options args for interpreter options. If they are present re-exec passing the proper options to the interpreter. If they are not present run the code directly.