diff options
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/python/PythonOptions.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/python/PythonOptions.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/python/PythonOptions.java b/src/main/java/com/google/devtools/build/lib/rules/python/PythonOptions.java index 34db74f489..81d1c76846 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/python/PythonOptions.java +++ b/src/main/java/com/google/devtools/build/lib/rules/python/PythonOptions.java @@ -24,8 +24,6 @@ import com.google.devtools.common.options.TriState; * Python-related command-line options. */ public class PythonOptions extends FragmentOptions { - static final PythonVersion DEFAULT_PYTHON_VERSION = PythonVersion.PY2; - /** * Converter for the --force_python option. */ @@ -69,7 +67,11 @@ public class PythonOptions extends FragmentOptions { public PythonVersion hostForcePython; public PythonVersion getPythonVersion() { - return (forcePython == null) ? DEFAULT_PYTHON_VERSION : forcePython; + return getPythonVersion(PythonVersion.DEFAULT); + } + + public PythonVersion getPythonVersion(PythonVersion defaultVersion) { + return (forcePython == null) ? defaultVersion : forcePython; } @Override |