diff options
author | Googler <noreply@google.com> | 2016-02-04 11:34:09 +0000 |
---|---|---|
committer | David Chen <dzc@google.com> | 2016-02-04 18:13:53 +0000 |
commit | 5f86468709e2413339d7948236abb5753fa94076 (patch) | |
tree | 05946b499da0b32a4afac3da9500fd748a165b47 /src/main/java/com/google/devtools/build/lib/rules/python/PyCommon.java | |
parent | 9273c766b9766f702093a15b466748cf3f516a7c (diff) |
Change text of python package hyphen error
This message change is intended to make it clearer that hyphens are not allowed anywhere in the path that forms a Python package name, and there's no way around it, except for moving
the Python rules to a different directory.
--
MOS_MIGRATED_REVID=113833071
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/python/PyCommon.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/python/PyCommon.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/python/PyCommon.java b/src/main/java/com/google/devtools/build/lib/rules/python/PyCommon.java index 126a2188b0..a1673bb6f6 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/python/PyCommon.java +++ b/src/main/java/com/google/devtools/build/lib/rules/python/PyCommon.java @@ -169,7 +169,8 @@ public final class PyCommon { .getPrerequisites("srcs", Mode.TARGET, FileProvider.class)) { // Make sure that none of the sources contain hyphens. if (Util.containsHyphen(src.getLabel().getPackageFragment())) { - ruleContext.attributeError("srcs", src.getLabel() + ": package name may not contain '-'"); + ruleContext.attributeError("srcs", + src.getLabel() + ": paths to Python packages may not contain '-'"); } Iterable<Artifact> pySrcs = FileType.filter(src.getFilesToBuild(), PyRuleClasses.PYTHON_SOURCE); @@ -191,7 +192,7 @@ public final class PyCommon { */ void validatePackageName() { if (Util.containsHyphen(ruleContext.getLabel().getPackageFragment())) { - ruleContext.ruleError("package name may not contain '-'"); + ruleContext.ruleError("paths to Python packages may not contain '-'"); } } |