diff options
author | Googler <noreply@google.com> | 2018-06-12 12:03:07 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-06-12 12:04:25 -0700 |
commit | c958649131ab8cf48a881aaddc50390cb7d79bfb (patch) | |
tree | b9a8d901886afa8d4519d5b6c14d71adb53a7af8 /src/main/java/com/google/devtools/build/lib/rules/python/PythonUtils.java | |
parent | 01cc4796b59bc0f81c2ee87fe7d8043df6b91e19 (diff) |
Automated rollback of commit a1c9f8d33457cd1f3b01299863bcab2667c13a52.
*** Reason for rollback ***
PY3 does not support Python proto1.
*** Original change description ***
Automated rollback of commit 4c72a82ada742bd369185cd07c57f96c497ce440.
*** Reason for rollback ***
Breaks, at least, //ads/aswan/tools:format_mr_results.
*** Original change description ***
Remove python3/ prefix to generated .pyc files.
That makes:
(a) merging PY2 and PY3 .runfiles impossible (which is incorrect anyway) and
(b) generated .py source files incompatible with 2to3 (src_version=PY2) - that's OK as we deprecate 2to3.
RELNOTES: n/a
PiperOrigin-RevId: 200256210
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/python/PythonUtils.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/python/PythonUtils.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/python/PythonUtils.java b/src/main/java/com/google/devtools/build/lib/rules/python/PythonUtils.java index 7acd86c55a..c524a3034c 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/python/PythonUtils.java +++ b/src/main/java/com/google/devtools/build/lib/rules/python/PythonUtils.java @@ -81,14 +81,14 @@ public final class PythonUtils { } /** - * Get the artifact generated by the 2to3 action. The artifact is in a python3 - * subdirectory to avoid conflicts (eg. when the input file is generated). + * Get the artifact generated by the 2to3 action. + * (There might be conflicts eg. when the input file is generated, but that case is unsupported + * because 2to3 is obsolete). */ private static Artifact get2to3OutputArtifact(RuleContext ruleContext, Artifact input) { ArtifactRoot root = ruleContext.getConfiguration().getGenfilesDirectory(ruleContext.getRule().getRepository()); - PathFragment path = PathFragment.create("python3").getRelative(input.getRootRelativePath()); - return ruleContext.getShareableArtifact(path, root); + return ruleContext.getDerivedArtifact(input.getRootRelativePath(), root); } /** |