aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules/python/PythonUtils.java
diff options
context:
space:
mode:
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.java8
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);
}
/**