Documentation
¶
Index ¶
- Constants
- func Build(entryResolver EntryResolver, installProcess InstallProcess, ...) packit.BuildFunc
- func Detect() packit.DetectFunc
- type BuildPlanMetadata
- type EntryResolver
- type Executable
- type InstallProcess
- type PoetryInstallProcess
- type PythonPathLookupProcess
- type PythonPathProcess
- type SBOMGenerator
Constants ¶
const CPython = "cpython"
CPython is the name of the python runtime dependency provided by the CPython buildpack: https://github.com/paketo-buildpacks/cpython.
const CacheLayerName = "cache"
CacheLayerName holds the poetry cache.
const Poetry = "poetry"
Poetry is the name of the dependency provided by the Poetry buildpack: https://github.com/paketo-buildpacks/poetry.
const PoetryVenv = "poetry-venv"
PoetryVenv is the name of the dependency provided by the Poetry Install buildpack.
const VenvLayerName = "poetry-venv"
VenvLayerName is the name of the layer where the venv dependencies are installed to.
Variables ¶
This section is empty.
Functions ¶
func Build ¶
func Build(entryResolver EntryResolver, installProcess InstallProcess, pythonPathProcess PythonPathLookupProcess, sbomGenerator SBOMGenerator, clock chronos.Clock, logger scribe.Emitter) packit.BuildFunc
Build will return a packit.BuildFunc that will be invoked during the build phase of the buildpack lifecycle.
Build will install the poetry dependencies by using the pyproject.toml file to a virtual environment layer.
Types ¶
type BuildPlanMetadata ¶
type BuildPlanMetadata struct { // Build denotes the dependency is needed at build-time. Build bool `toml:"build"` }
BuildPlanMetadata is the buildpack specific data included in build plan requirements.
type EntryResolver ¶
type EntryResolver interface {
MergeLayerTypes(name string, entries []packit.BuildpackPlanEntry) (launch, build bool)
}
EntryResolver defines the interface for picking the most relevant entry from the Buildpack Plan entries.
type Executable ¶
Executable defines the interface for invoking an executable.
type InstallProcess ¶
InstallProcess defines the interface for installing the poetry dependencies. It returns the location of the virtual env directory.
type PoetryInstallProcess ¶
type PoetryInstallProcess struct {
// contains filtered or unexported fields
}
PoetryInstallProcess implements the InstallProcess interface.
func NewPoetryInstallProcess ¶
func NewPoetryInstallProcess(executable Executable, logger scribe.Emitter) PoetryInstallProcess
NewPoetryInstallProcess creates an instance of the PoetryInstallProcess given an Executable.
type PythonPathLookupProcess ¶
PythonPathProcess defines the interface for finding the PYTHONPATH (AKA the site-packages directory)
type PythonPathProcess ¶
type PythonPathProcess struct { }
PythonPathProcess implements the Executable interface.
func NewPythonPathProcess ¶
func NewPythonPathProcess() PythonPathProcess
NewPythonPathProcess creates an instance of the PythonPathProcess.