You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ bazel build --incompatible_allow_python_version_transitions :test
INFO: Build option --python_top has changed, discarding analysis cache.
INFO: Analysed target //:test (1 packages loaded, 103 targets configured).
INFO: Found 1 target...
ERROR: /Users/athompson/code/bazel-testing/bazel-py3-binary-as-implicit-rule-dep/src/BUILD:1:1: This target is being built for Python 2 but (transitively) includes Python 3-only sources. You can get diagnostic information about which dependencies introduce this version requirement by running the `find_requirements` aspect. For more info see the documentation for the `srcs_version` attribute.
Target //:test failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 0.481s, Critical Path: 0.01s
INFO: 0 processes.
FAILED: Build did NOT complete successfully
Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Yes, this is the generalization of #6443: there's no way to have multiple configurations in host mode, so the plan is to replace host with a host-like mode that allows different configurations. Closing as duplicate.
Note that for non-host configured implicit dependencies, this should work.
Description of the problem
A rule that depends on a
py_binary
withpython_version = "PY3"
uses Python 2 interpreter when executing that binary.Example
BUILD
:rules.bzl
:src/BUILD
:Build result:
Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
git clone https://github.com/apt-itude/bazel-py3-binary-as-implicit-rule-dep.git
cd bazel-py3-binary-as-implicit-rule-dep/
bazel build //:test
What operating system are you running Bazel on?
CentOS Linux release 7.5.1804
What's the output of
bazel info release
?release 0.24.0- (@non-git)
If
bazel info release
returns "development version" or "(@Non-Git)", tell us how you built Bazel.Installed from
vbatts-bazel
COPR repository.Have you found anything relevant by searching the web?
Issue #6443 might be related, just based on the comment that
cfg = "host"
"prevents switching the PY2/PY3 mode".The text was updated successfully, but these errors were encountered: