Skip to content
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

Implement PEX_INTERPRETER special mode support. #1149

Merged
merged 1 commit into from
Dec 17, 2020

Conversation

jsirois
Copy link
Member

@jsirois jsirois commented Dec 17, 2020

This brings the venv pex script up to parity with PEX files.

Fixes #1136

This brings the venv pex script up to parity with PEX files.

Fixes pex-tool#1136
@jsirois jsirois requested a review from stuhood December 17, 2020 00:00
else pex_overrides.get("PEX_MODULE", {entry_point!r} or "code:interact")
PEX_INTERPRETER_ENTRYPOINT
if pex_interpreter
else pex_overrides.get("PEX_MODULE", {entry_point!r} or PEX_INTERPRETER_ENTRYPOINT)
)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we trending toward this codepath replacing the existing codepath, or are we expecting them to live in parallel for the medium future? Not terribly complicated, but if it's going to continue to grow, some sort of de-duplication might be in order.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I expect these to live in parallel for the foreseeable future. That aside, fhe factored out code could never use anything but the stdlib which we'd need infra to check / enforce and it might have to get tortured slightly to deal with PEX needing to demote its bootstrap at the right point in time in the different branches. Not sure about the last bit - may be a non-problem. May be worth doing, but the test coverage here seems sufficient to punt doing that.

Copy link

@stuhood stuhood Dec 17, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed: great coverage.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yeah - the grow question - no growth. This should be the last for PEX_INTERPRETER handling until some new Python release adds new interpreter options that make sense for PEX-as-an-interpreter to support.

@jsirois jsirois merged commit 430e25f into pex-tool:master Dec 17, 2020
@jsirois jsirois deleted the issues/1136 branch December 17, 2020 01:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for PEX_INTERPRETER -c, -m and - special modes to PEX venvs.
2 participants