Skip to content

Update py2/3 proposal to address select() behavior #141

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

Merged
merged 5 commits into from
Dec 17, 2018
Merged

Conversation

brandjon
Copy link
Contributor

@brandjon brandjon commented Dec 5, 2018

No description provided.

@brandjon
Copy link
Contributor Author

brandjon commented Dec 5, 2018

@serynth The change just briefly outlines what we talked about yesterday. (This is just an update-the-doc PR so review is a formality for dotting i's and crossing t's.)


`select()` is able to inspect the value of `"python_version"`, and it will always match either "PY2" or "PY3".
A new `select()`-able target is created at `@bazel_tools//python:python_version`. It can be used in the `feature_flags` attribute of `config_setting` and always equals either `"PY2"` or `"PY3"`. In the future this flag may be moved out of `@bazel_tools` and into `bazelbuild/rules_python`. It may also be made into a `build_setting` so that the native `--python_version` flag can migrate to it. It is not allowed to use `"force_python"` in a `config_setting`.

Choose a reason for hiding this comment

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

Did you mean flag_values?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done, thanks!

Copy link

@programmablereya programmablereya left a comment

Choose a reason for hiding this comment

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

Excellent! :D

@brandjon brandjon merged commit c08d1e6 into master Dec 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants