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

Support --venv mode for pex_binary targets. #11510

Merged
merged 2 commits into from Feb 6, 2021

Conversation

jsirois
Copy link
Member

@jsirois jsirois commented Feb 2, 2021

Introduce the execution_mode field to pex_binary which accepts
'zipapp' (the default), 'unzip' and 'venv' and deprecate the unzip
field.

[ci skip-rust]
[ci skip-build-wheels]

Introduce the `execution_mode` field to `pex_binary` which accepts
'zipapp' (the default), 'unzip' and 'venv' and deprecate the `unzip`
field.

[ci skip-rust]
[ci skip-build-wheels]
Copy link
Contributor

@Eric-Arellano Eric-Arellano left a comment

Choose a reason for hiding this comment

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

Excellent! I like this modeling and I appreciate the very informative help message.

In the future, will you plan to make this field required, or perhaps change the default to be venv?

src/python/pants/backend/python/target_types.py Outdated Show resolved Hide resolved
src/python/pants/backend/python/target_types.py Outdated Show resolved Hide resolved
@jsirois
Copy link
Member Author

jsirois commented Feb 2, 2021

In the future, will you plan to make this field required, or perhaps change the default to be venv?

I see no reason to make this - or any - field required if there is a sensible default, and there is. In this case its the underlying tool's (Pex's) default. I have no clue what the future default will be yet.

# Rust tests and lints will be skipped. Delete if not intended.
[ci skip-rust]

# Building wheels and fs_util will be skipped. Delete if not intended.
[ci skip-build-wheels]
@jsirois
Copy link
Member Author

jsirois commented Feb 5, 2021

Noting that I've been holding off merging this since a manual test that added execution_mode="venv" to two binaries in build-support/bin/BUILD led to surprising results. I've finally sussed this Pex bug out and filed: pex-tool/pex#1218

@jsirois jsirois mentioned this pull request Feb 5, 2021
@jsirois jsirois merged commit 8ef04e4 into pantsbuild:master Feb 6, 2021
@jsirois jsirois deleted the pex_binary/expose_venv branch February 6, 2021 00:08
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.

None yet

2 participants