aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main
diff options
context:
space:
mode:
authorGravatar Laurent Le Brun <laurentlb@google.com>2015-05-07 14:00:07 +0000
committerGravatar Lukacs Berki <lberki@google.com>2015-05-07 14:06:54 +0000
commita6b401839e44155909b79d4ef534a90bb7f2eac6 (patch)
tree4e49e13b7f7c3e7c04c25a42f28b9843bd0aa67b /src/main
parenta0592a13c8801f395a17641579f16a3c3bc4587e (diff)
Expose PythonSourcesProvider to Skylark.
-- MOS_MIGRATED_REVID=93025992
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/python/PythonSourcesProvider.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/python/PythonSourcesProvider.java b/src/main/java/com/google/devtools/build/lib/rules/python/PythonSourcesProvider.java
index 32bf3e38b6..7df4609db8 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/python/PythonSourcesProvider.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/python/PythonSourcesProvider.java
@@ -17,12 +17,15 @@ import com.google.devtools.build.lib.actions.Artifact;
import com.google.devtools.build.lib.analysis.TransitiveInfoProvider;
import com.google.devtools.build.lib.collect.nestedset.NestedSet;
import com.google.devtools.build.lib.concurrent.ThreadSafety.Immutable;
+import com.google.devtools.build.lib.syntax.SkylarkCallable;
+import com.google.devtools.build.lib.syntax.SkylarkModule;
/**
* A provider interface for configured targets that provide source files to
* Python targets.
*/
@Immutable
+@SkylarkModule(name = "PythonSourcesProvider", doc = "")
public final class PythonSourcesProvider implements TransitiveInfoProvider {
private final NestedSet<Artifact> transitivePythonSources;
@@ -37,6 +40,7 @@ public final class PythonSourcesProvider implements TransitiveInfoProvider {
/**
* Returns the Python sources in the transitive closure of this target.
*/
+ @SkylarkCallable(name = "transitive_srcs", doc = "", structField = true)
public NestedSet<Artifact> getTransitivePythonSources() {
return transitivePythonSources;
}
@@ -48,4 +52,3 @@ public final class PythonSourcesProvider implements TransitiveInfoProvider {
return usesSharedLibraries;
}
}
-