diff options
author | 2017-12-04 05:56:40 -0800 | |
---|---|---|
committer | 2017-12-04 05:57:57 -0800 | |
commit | 2c63af5c886b7e328f3996ae1ef7d0bcb07b2b54 (patch) | |
tree | 8bb60b59861b0181bf2e79544d00549d0e18f321 /src | |
parent | 515ba8967aeb32be50783bf6c60f0de6e6bdba8d (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.java | 2 |
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."); } |