aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/bazel/rules/python
diff options
context:
space:
mode:
authorGravatar Googler <noreply@google.com>2015-07-27 09:16:53 +0000
committerGravatar Damien Martin-Guillerez <dmarting@google.com>2015-07-27 12:58:40 +0000
commit20b15fbf1cd36a99c306c6d0324e4aeb328df36e (patch)
treeccd5a66e332b64efbb1ebba7470de4d4e6b2aefc /src/main/java/com/google/devtools/build/lib/bazel/rules/python
parent31143247f9c2ab78aee92c07dd7e664904e8b4f2 (diff)
Enable simple compilation of Python artifacts for py_binary and py_library.
-- MOS_MIGRATED_REVID=99163140
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/bazel/rules/python')
-rw-r--r--src/main/java/com/google/devtools/build/lib/bazel/rules/python/BazelPythonSemantics.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/bazel/rules/python/BazelPythonSemantics.java b/src/main/java/com/google/devtools/build/lib/bazel/rules/python/BazelPythonSemantics.java
index e560f6dd20..416e77c450 100644
--- a/src/main/java/com/google/devtools/build/lib/bazel/rules/python/BazelPythonSemantics.java
+++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/python/BazelPythonSemantics.java
@@ -15,6 +15,7 @@
package com.google.devtools.build.lib.bazel.rules.python;
import com.google.common.collect.ImmutableList;
+import com.google.devtools.build.lib.actions.Artifact;
import com.google.devtools.build.lib.analysis.RuleContext;
import com.google.devtools.build.lib.analysis.Runfiles.Builder;
import com.google.devtools.build.lib.analysis.RunfilesSupport;
@@ -27,6 +28,8 @@ import com.google.devtools.build.lib.rules.python.PythonSemantics;
import com.google.devtools.build.lib.rules.test.InstrumentedFilesCollector.InstrumentationSpec;
import com.google.devtools.build.lib.util.FileTypeSet;
+import java.util.Collection;
+
/**
* Functionality specific to the Python rules in Bazel.
*/
@@ -55,6 +58,12 @@ public class BazelPythonSemantics implements PythonSemantics {
}
@Override
+ public Collection<Artifact> precompiledPythonFiles(
+ RuleContext ruleContext, Collection<Artifact> sources, PyCommon common) {
+ return ImmutableList.of();
+ }
+
+ @Override
public void createExecutable(RuleContext ruleContext, PyCommon common,
CcLinkParamsStore ccLinkParamsStore) {
String main = common.determineMainExecutableSource();