public class PythonBinaryDescription extends Object implements DescriptionWithTargetGraph<PythonBinaryDescriptionArg>, ImplicitDepsInferringDescription<com.facebook.buck.features.python.PythonBinaryDescription.AbstractPythonBinaryDescriptionArg>, VersionRoot<PythonBinaryDescriptionArg>
Constructor and Description |
---|
PythonBinaryDescription(ToolchainProvider toolchainProvider,
PythonBuckConfig pythonBuckConfig,
CxxBuckConfig cxxBuckConfig) |
Modifier and Type | Method and Description |
---|---|
static com.google.common.collect.ImmutableMap<Path,SourcePath> |
addMissingInitModules(com.google.common.collect.ImmutableMap<Path,SourcePath> modules,
SourcePath emptyInit) |
PythonBinary |
createBuildRule(BuildRuleCreationContextWithTargetGraph context,
BuildTarget buildTarget,
BuildRuleParams params,
PythonBinaryDescriptionArg args)
Create a
BuildRule for the given BuildRuleParams . |
static SourcePath |
createEmptyInitModule(BuildTarget buildTarget,
ProjectFilesystem projectFilesystem,
ActionGraphBuilder graphBuilder) |
void |
findDepsForTargetFromConstructorArgs(BuildTarget buildTarget,
CellNameResolver cellRoots,
com.facebook.buck.features.python.PythonBinaryDescription.AbstractPythonBinaryDescriptionArg constructorArg,
com.google.common.collect.ImmutableCollection.Builder<BuildTarget> extraDepsBuilder,
com.google.common.collect.ImmutableCollection.Builder<BuildTarget> targetGraphOnlyDepsBuilder) |
Class<PythonBinaryDescriptionArg> |
getConstructorArgType()
The type of the constructor argument that is used by this description to create a rule
|
static BuildTarget |
getEmptyInitTarget(BuildTarget baseTarget) |
boolean |
producesCacheableSubgraph()
Whether or not the build rule subgraph produced by this
Description is safe to cache in
IncrementalActionGraphGenerator
for incremental action graph generation. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isVersionRoot
getConfigurationDeps
public PythonBinaryDescription(ToolchainProvider toolchainProvider, PythonBuckConfig pythonBuckConfig, CxxBuckConfig cxxBuckConfig)
public Class<PythonBinaryDescriptionArg> getConstructorArgType()
BaseDescription
getConstructorArgType
in interface BaseDescription<PythonBinaryDescriptionArg>
public static BuildTarget getEmptyInitTarget(BuildTarget baseTarget)
public static SourcePath createEmptyInitModule(BuildTarget buildTarget, ProjectFilesystem projectFilesystem, ActionGraphBuilder graphBuilder)
public static com.google.common.collect.ImmutableMap<Path,SourcePath> addMissingInitModules(com.google.common.collect.ImmutableMap<Path,SourcePath> modules, SourcePath emptyInit)
public PythonBinary createBuildRule(BuildRuleCreationContextWithTargetGraph context, BuildTarget buildTarget, BuildRuleParams params, PythonBinaryDescriptionArg args)
DescriptionWithTargetGraph
BuildRule
for the given BuildRuleParams
. Note that the BuildTarget
referred to in the params
contains the Flavor
to create.createBuildRule
in interface DescriptionWithTargetGraph<PythonBinaryDescriptionArg>
args
- A constructor argument, of type as returned by BaseDescription.getConstructorArgType()
.BuildRule
that describes the default flavour of the rule being described.public void findDepsForTargetFromConstructorArgs(BuildTarget buildTarget, CellNameResolver cellRoots, com.facebook.buck.features.python.PythonBinaryDescription.AbstractPythonBinaryDescriptionArg constructorArg, com.google.common.collect.ImmutableCollection.Builder<BuildTarget> extraDepsBuilder, com.google.common.collect.ImmutableCollection.Builder<BuildTarget> targetGraphOnlyDepsBuilder)
findDepsForTargetFromConstructorArgs
in interface ImplicitDepsInferringDescription<com.facebook.buck.features.python.PythonBinaryDescription.AbstractPythonBinaryDescriptionArg>
public boolean producesCacheableSubgraph()
DescriptionWithTargetGraph
Description
is safe to cache in
IncrementalActionGraphGenerator
for incremental action graph generation.producesCacheableSubgraph
in interface Description<PythonBinaryDescriptionArg>
producesCacheableSubgraph
in interface DescriptionWithTargetGraph<PythonBinaryDescriptionArg>