aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib
diff options
context:
space:
mode:
authorGravatar lberki <lberki@google.com>2017-07-13 09:32:03 +0200
committerGravatar László Csomor <laszlocsomor@google.com>2017-07-13 09:57:08 +0200
commit5d453d93499e328d4c0ea9b8f0c6ff4bbba08b54 (patch)
tree558e1aa7aab892c58be4eb12288f25bdaf796e7f /src/main/java/com/google/devtools/build/lib
parent05370cda96765a18986538d17ff2e07e4a5935ce (diff)
Categorize Python options.
RELNOTES: None. PiperOrigin-RevId: 161772560
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib')
-rw-r--r--src/main/java/com/google/devtools/build/lib/bazel/rules/python/BazelPythonConfiguration.java21
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/python/PythonOptions.java8
2 files changed, 16 insertions, 13 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 53f05a1b1a..8adc4335b1 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
@@ -30,6 +30,7 @@ import com.google.devtools.build.lib.vfs.PathFragment;
import com.google.devtools.common.options.Converter;
import com.google.devtools.common.options.Option;
import com.google.devtools.common.options.OptionDocumentationCategory;
+import com.google.devtools.common.options.proto.OptionFilters;
import com.google.devtools.common.options.proto.OptionFilters.OptionEffectTag;
/**
@@ -64,8 +65,9 @@ public class BazelPythonConfiguration extends BuildConfiguration.Fragment {
name = "python2_path",
defaultValue = "python",
category = "version",
- documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
- effectTags = {OptionEffectTag.UNKNOWN},
+ documentationCategory = OptionDocumentationCategory.TOOLCHAIN,
+ effectTags = {OptionEffectTag.LOADING_AND_ANALYSIS, OptionEffectTag.AFFECTS_OUTPUTS},
+ metadataTags = { OptionFilters.OptionMetadataTag.DEPRECATED },
help = "Local path to the Python2 executable. "
+ "Deprecated, please use python_path or python_top instead."
)
@@ -76,8 +78,9 @@ public class BazelPythonConfiguration extends BuildConfiguration.Fragment {
converter = Python3PathConverter.class,
defaultValue = "auto",
category = "version",
- documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
- effectTags = {OptionEffectTag.UNKNOWN},
+ documentationCategory = OptionDocumentationCategory.TOOLCHAIN,
+ effectTags = {OptionEffectTag.LOADING_AND_ANALYSIS, OptionEffectTag.AFFECTS_OUTPUTS},
+ metadataTags = { OptionFilters.OptionMetadataTag.DEPRECATED },
help = "Local path to the Python3 executable. "
+ "Deprecated, please use python_path or python_top instead."
)
@@ -88,8 +91,8 @@ public class BazelPythonConfiguration extends BuildConfiguration.Fragment {
converter = LabelConverter.class,
defaultValue = "null",
category = "version",
- documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
- effectTags = {OptionEffectTag.UNKNOWN},
+ documentationCategory = OptionDocumentationCategory.TOOLCHAIN,
+ effectTags = {OptionEffectTag.LOADING_AND_ANALYSIS, OptionEffectTag.AFFECTS_OUTPUTS},
help =
"The label of py_runtime rule used for the Python interpreter invoked by Bazel."
)
@@ -99,8 +102,8 @@ public class BazelPythonConfiguration extends BuildConfiguration.Fragment {
name = "python_path",
defaultValue = "python",
category = "version",
- documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
- effectTags = {OptionEffectTag.UNKNOWN},
+ documentationCategory = OptionDocumentationCategory.TOOLCHAIN,
+ effectTags = {OptionEffectTag.LOADING_AND_ANALYSIS, OptionEffectTag.AFFECTS_OUTPUTS},
help =
"The absolute path of the Python interpreter invoked by Bazel."
)
@@ -110,7 +113,7 @@ public class BazelPythonConfiguration extends BuildConfiguration.Fragment {
name = "experimental_python_import_all_repositories",
defaultValue = "true",
documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
- effectTags = {OptionEffectTag.UNKNOWN},
+ effectTags = {OptionEffectTag.LOADING_AND_ANALYSIS},
help = "Do not use."
)
public boolean experimentalPythonImportAllRepositories;
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 1960a51231..52cc692174 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
@@ -39,8 +39,8 @@ public class PythonOptions extends FragmentOptions {
defaultValue = "null",
category = "version",
converter = PythonVersionConverter.class,
- documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
- effectTags = {OptionEffectTag.UNKNOWN},
+ documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS,
+ effectTags = {OptionEffectTag.LOADING_AND_ANALYSIS, OptionEffectTag.AFFECTS_OUTPUTS},
help = "Overrides default_python_version attribute. Can be \"PY2\" or \"PY3\"."
)
public PythonVersion forcePython;
@@ -50,8 +50,8 @@ public class PythonOptions extends FragmentOptions {
defaultValue = "null",
category = "version",
converter = PythonVersionConverter.class,
- documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
- effectTags = {OptionEffectTag.UNKNOWN},
+ documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS,
+ effectTags = {OptionEffectTag.LOADING_AND_ANALYSIS, OptionEffectTag.AFFECTS_OUTPUTS},
help =
"Overrides default_python_version attribute for the host configuration."
+ " Can be \"PY2\" or \"PY3\"."