Skip to content

Commit

Permalink
Enable Python toolchains by default
Browse files Browse the repository at this point in the history
(This is a roll-forward of bazelbuild@bf66dc7.)

This flips --incompatible_use_python_toolchains, which deprecates --python_top (and for the most part, --python_path). See bazelbuild#7899 for more on the change and migration procedure.

Known downstream breakages are summarized [here](bazelbuild#7899 (comment)).

Fixes bazelbuild#7899, fixes bazelbuild#7375, significant progress on bazelbuild#4815.

RELNOTES[INC]: Python rules now determine the Python runtime using toolchains rather than `--python_top` and `--python_path`, which are deprecated. See [bazelbuild#7899](bazelbuild#7899) for information on declaring Python toolchains and migrating your code. As a side-benefit, this addresses [bazelbuild#4815](bazelbuild#4815) (incorrect interpreter version used) on non-Windows platforms. Note however that some builds break due to getting the version they asked for -- consider setting `python_version = "PY2"` on Python 2 targets and `--host_force_python=PY2` if any Python 2 targets are used in the host configuration. You can temporarily opt out of this change with `--incompatible_use_python_toolchains=false`.

PiperOrigin-RevId: 250918912
  • Loading branch information
brandjon authored and irengrig committed Jul 15, 2019
1 parent c1725e4 commit 8977225
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ public String getTypeDescription() {

@Option(
name = "incompatible_use_python_toolchains",
defaultValue = "false",
defaultValue = "true",
documentationCategory = OptionDocumentationCategory.GENERIC_INPUTS,
effectTags = {OptionEffectTag.LOADING_AND_ANALYSIS},
metadataTags = {
Expand Down

0 comments on commit 8977225

Please sign in to comment.