aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Misha Seltzer <mishas@users.noreply.github.com>2017-12-04 05:56:40 -0800
committerGravatar Copybara-Service <copybara-piper@google.com>2017-12-04 05:57:57 -0800
commit2c63af5c886b7e328f3996ae1ef7d0bcb07b2b54 (patch)
tree8bb60b59861b0181bf2e79544d00549d0e18f321 /src
parent515ba8967aeb32be50783bf6c60f0de6e6bdba8d (diff)
Allow `python3` as value for the `--python_path` flag.
Resolves issue https://github.com/bazelbuild/bazel/issues/4146 Closes #4147. PiperOrigin-RevId: 177803394
Diffstat (limited to 'src')
-rw-r--r--src/main/java/com/google/devtools/build/lib/bazel/rules/python/BazelPythonConfiguration.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/bazel/rules/python/BazelPythonConfiguration.java b/src/main/java/com/google/devtools/build/lib/bazel/rules/python/BazelPythonConfiguration.java
index d43bcfce3f..5c504b8477 100644
--- a/src/main/java/com/google/devtools/build/lib/bazel/rules/python/BazelPythonConfiguration.java
+++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/python/BazelPythonConfiguration.java
@@ -138,7 +138,7 @@ public class BazelPythonConfiguration extends BuildConfiguration.Fragment {
= new BazelPythonConfiguration(buildOptions.get(Options.class));
String pythonPath = pythonConfiguration.getPythonPath();
- if (!pythonPath.equals("python") && !PathFragment.create(pythonPath).isAbsolute()) {
+ if (!pythonPath.startsWith("python") && !PathFragment.create(pythonPath).isAbsolute()) {
throw new InvalidConfigurationException(
"python_path must be an absolute path when it is set.");
}