Interface PythonPackagable
-
- All Superinterfaces:
HasBuildTarget
- All Known Implementing Classes:
CxxPythonExtension
,PrebuiltPythonLibrary
,PythonLibrary
public interface PythonPackagable extends HasBuildTarget
Represents aBuildRule
which contributes components to a top-level Python binary or test.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default boolean
doesPythonPackageDisallowOmnibus(PythonPlatform pythonPlatform, CxxPlatform cxxPlatform, ActionGraphBuilder graphBuilder)
Allow this rule to opt-out it's transitive dependencies from omnibus linking.default Optional<PythonComponents>
getPythonBytecode(PythonPlatform pythonPlatform, CxxPlatform cxxPlatform, ActionGraphBuilder graphBuilder)
Compiled Python bytecode (e.g.default Optional<? extends PythonComponents>
getPythonModules(PythonPlatform pythonPlatform, CxxPlatform cxxPlatform, ActionGraphBuilder graphBuilder)
Python modules (i.e.Iterable<BuildRule>
getPythonPackageDeps(PythonPlatform pythonPlatform, CxxPlatform cxxPlatform, ActionGraphBuilder graphBuilder)
default Optional<? extends PythonComponents>
getPythonResources(PythonPlatform pythonPlatform, CxxPlatform cxxPlatform, ActionGraphBuilder graphBuilder)
Resources (e.g.default Optional<Boolean>
isPythonZipSafe()
-
Methods inherited from interface com.facebook.buck.core.model.HasBuildTarget
getBuildTarget
-
-
-
-
Method Detail
-
getPythonPackageDeps
Iterable<BuildRule> getPythonPackageDeps(PythonPlatform pythonPlatform, CxxPlatform cxxPlatform, ActionGraphBuilder graphBuilder)
-
getPythonModules
default Optional<? extends PythonComponents> getPythonModules(PythonPlatform pythonPlatform, CxxPlatform cxxPlatform, ActionGraphBuilder graphBuilder)
Python modules (i.e. sources, bytecode, or native extensions) associated with this rule.- Returns:
- a map of modules, where the key is the module in
Path
form (including extension).
-
getPythonResources
default Optional<? extends PythonComponents> getPythonResources(PythonPlatform pythonPlatform, CxxPlatform cxxPlatform, ActionGraphBuilder graphBuilder)
Resources (e.g. data files) associated with this rule.- Returns:
- a map of native libraries, where the key is the soname wrapped as a
Path
.
-
getPythonBytecode
default Optional<PythonComponents> getPythonBytecode(PythonPlatform pythonPlatform, CxxPlatform cxxPlatform, ActionGraphBuilder graphBuilder)
Compiled Python bytecode (e.g. `.pyc`) associated with this rule.- Returns:
- a map of compiled Python bytecode, where the key is the module in
Path
form (including extension).
-
isPythonZipSafe
default Optional<Boolean> isPythonZipSafe()
- Returns:
- whether the modules in this rule can be imported/run transparently from a Zip file (e.g. via zipimport). This is almost always the case, but in rare situations (e.g. execution expects to find packaged files in disk) rules can opt-out.
-
doesPythonPackageDisallowOmnibus
default boolean doesPythonPackageDisallowOmnibus(PythonPlatform pythonPlatform, CxxPlatform cxxPlatform, ActionGraphBuilder graphBuilder)
Allow this rule to opt-out it's transitive dependencies from omnibus linking. This is mainly useful for the case of prebuilt python packages including prebuilt native extensions in their sources parameter, which expect any native library dependencies to not be merged.- Returns:
- whether this
PythonPackagable
's transitive deps must be excluded from omnibus linking.
-
-