conda

package
v0.0.0-...-a79fb06 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EXTERNALLY_MANAGED = "EXTERNALLY-MANAGED"
)
View Source
const (
	Newline = "\n"
)

Variables

View Source
var (
	FileExtensions = []string{""}
	Shell          = []string{"bash", "--noprofile", "--norc", "-i"}
)

Functions

func Activate

func Activate(sink io.Writer, targetFolder string) error

func ApplyExternallyManaged

func ApplyExternallyManaged(path string) (label string, err error)

func AsUnifiedLines

func AsUnifiedLines(value string) []string

func AsVersion

func AsVersion(incoming string) (uint64, string)

func BinMicromamba

func BinMicromamba() string

func BugsCleanup

func BugsCleanup()

func Cleanup

func Cleanup(daylimit int, dryrun, quick, all, micromamba, downloads, noCompress, caches bool) (err error)

func CondaEnvironment

func CondaEnvironment() []string

func CondaExecutionEnvironment

func CondaExecutionEnvironment(location string, inject []string, full bool) []string

func CondaPaths

func CondaPaths(prefix string) []string

func DiagnoseDirty

func DiagnoseDirty(beforeLabel, afterLabel string, beforeHash, afterHash []byte, beforeErr, afterErr error, beforeDetails, afterDetails map[string]string, warning bool)

func DigestFor

func DigestFor(folder string, collect map[string]string) ([]byte, error)

func DirhashDiff

func DirhashDiff(history, future map[string]string, warning bool)

func DoExtract

func DoExtract(delay time.Duration) bool

func DoFailMicromamba

func DoFailMicromamba() bool

func EnforceLongpathSupport

func EnforceLongpathSupport() error

func FindPath

func FindPath(environment string) pathlib.PathParts

func FindPython

func FindPython(location string) (string, bool)

func FindUv

func FindUv(location string) (string, bool)

func GoldenMasterFilename

func GoldenMasterFilename(targetFolder string) string

func GunzipWrite

func GunzipWrite(context, filename string, blob []byte) (err error)

func HasLongPathSupport

func HasLongPathSupport() bool

func HasMicroMamba

func HasMicroMamba() bool

func HolotreePath

func HolotreePath(environment string) pathlib.PathParts

func IsCacheable

func IsCacheable(text string) bool

func IsSpecialCacheable

func IsSpecialCacheable(name, version string) bool

func IsWindows

func IsWindows() bool

func LegacyEnvironment

func LegacyEnvironment(recorder Recorder, force bool, skip SkipLayer, configuration string) error

func LiveCapture

func LiveCapture(liveFolder string, command ...string) (string, int, error)

func LiveExecution

func LiveExecution(sink io.Writer, liveFolder string, command ...string) (int, error)

func LoadActivationEnvironment

func LoadActivationEnvironment(targetFolder string) []string

func LoadWantedDependencies

func LoadWantedDependencies(filename string) dependencies

func LocalChannel

func LocalChannel() (string, bool)

func LogUnifiedEnvironment

func LogUnifiedEnvironment(content []byte)

func MakeRelativeMap

func MakeRelativeMap(root string, entries map[string]string) map[string]string
func MicromambaLink() string

func MicromambaVersion

func MicromambaVersion() string

func MustMicromamba

func MustMicromamba() bool

func PipVersion

func PipVersion(python string) string

func ReadConfig

func ReadConfig(filename string) (string, error)

func RemoveCurrentTemp

func RemoveCurrentTemp()

func SideBySideViewOfDependencies

func SideBySideViewOfDependencies(goldenfile, wantedfile string) (err error)

func SplitLines

func SplitLines(value string) []string

func UnifyLine

func UnifyLine(value string) string

func UvVersion

func UvVersion(uv string) string

func ValidLocation

func ValidLocation(value string) bool

func ValidateLocations

func ValidateLocations() bool

Types

type AnalyzerStrategy

type AnalyzerStrategy func(*PlanAnalyzer, string)

type Dependency

type Dependency struct {
	Original  string
	Name      string
	Qualifier string
	Versions  string
}

func AsDependency

func AsDependency(value string) *Dependency

func (*Dependency) ChooseSpecific

func (it *Dependency) ChooseSpecific(right *Dependency) (*Dependency, error)

func (*Dependency) ExactlySame

func (it *Dependency) ExactlySame(right *Dependency) bool

func (*Dependency) Index

func (it *Dependency) Index(others []*Dependency) int

func (*Dependency) IsCacheable

func (it *Dependency) IsCacheable() bool

func (*Dependency) IsExact

func (it *Dependency) IsExact() bool

func (*Dependency) Match

func (it *Dependency) Match(name string) bool

func (*Dependency) Representation

func (it *Dependency) Representation() string

func (*Dependency) SameAs

func (it *Dependency) SameAs(right *Dependency) bool

type Environment

type Environment struct {
	Name        string
	Prefix      string
	Channels    []string
	Conda       []*Dependency
	Pip         []*Dependency
	PostInstall []string
}

func CondaYamlFrom

func CondaYamlFrom(content []byte) (*Environment, error)

func ReadPackageCondaYaml

func ReadPackageCondaYaml(filename string) (*Environment, error)

func ReadPackageYaml

func ReadPackageYaml(filename string) (*Environment, error)

func SummonEnvironment

func SummonEnvironment(filename string) *Environment

func (*Environment) AsLayers

func (it *Environment) AsLayers() [3]string

func (*Environment) AsPureConda

func (it *Environment) AsPureConda() *Environment

func (*Environment) AsRequirementsText

func (it *Environment) AsRequirementsText() string

func (*Environment) AsYaml

func (it *Environment) AsYaml() (string, error)

func (*Environment) CondaList

func (it *Environment) CondaList() []interface{}

func (*Environment) Diagnostics

func (it *Environment) Diagnostics(target *common.DiagnosticStatus, production bool)

func (*Environment) FingerprintLayers

func (it *Environment) FingerprintLayers() [3]string

func (*Environment) FreezeDependencies

func (it *Environment) FreezeDependencies(fixed dependencies) *Environment

func (*Environment) FromDependencies

func (it *Environment) FromDependencies(fixed dependencies) (*Environment, bool)

func (*Environment) HasCondaDependency

func (it *Environment) HasCondaDependency(name string) bool

func (*Environment) IsCacheable

func (it *Environment) IsCacheable() bool

func (*Environment) Merge

func (it *Environment) Merge(right *Environment) (*Environment, error)

func (*Environment) PipList

func (it *Environment) PipList() []interface{}

func (*Environment) PipMap

func (it *Environment) PipMap() map[interface{}]interface{}

func (*Environment) PushChannel

func (it *Environment) PushChannel(channel string)

func (*Environment) PushConda

func (it *Environment) PushConda(dependency *Dependency) error

func (*Environment) PushPip

func (it *Environment) PushPip(dependency *Dependency) error

func (*Environment) SaveAs

func (it *Environment) SaveAs(filename string) error

func (*Environment) SaveAsRequirements

func (it *Environment) SaveAsRequirements(filename string) error

func (*Environment) WithoutPostInstall

func (it *Environment) WithoutPostInstall() *Environment

type InstallObserver

type InstallObserver map[string]bool

func (InstallObserver) HasFailures

func (it InstallObserver) HasFailures(targetFolder string) bool

func (InstallObserver) Write

func (it InstallObserver) Write(content []byte) (int, error)

type PlanAnalyzer

type PlanAnalyzer struct {
	Strategies StrategyMap
	Active     AnalyzerStrategy
	Notes      []string
	Pending    []byte
	Repeats    RepeatCache
	Realtime   bool
	Details    bool
	Started    time.Time
}

func NewPlanAnalyzer

func NewPlanAnalyzer(realtime bool) *PlanAnalyzer

func (*PlanAnalyzer) Close

func (it *PlanAnalyzer) Close()

func (*PlanAnalyzer) Observe

func (it *PlanAnalyzer) Observe(event string)

func (*PlanAnalyzer) Write

func (it *PlanAnalyzer) Write(blob []byte) (int, error)

type PlanWriter

type PlanWriter struct {
	// contains filtered or unexported fields
}

func NewPlanWriter

func NewPlanWriter(filename string) *PlanWriter

func (*PlanWriter) AsText

func (it *PlanWriter) AsText() string

func (*PlanWriter) Save

func (it *PlanWriter) Save() error

func (*PlanWriter) Write

func (it *PlanWriter) Write(blob []byte) (int, error)

type Recorder

type Recorder interface {
	Record([]byte) error
}

type RepeatCache

type RepeatCache map[string]bool

type SkipLayer

type SkipLayer uint8
const (
	SkipNoLayers         SkipLayer = iota
	SkipMicromambaLayer  SkipLayer = iota
	SkipPipLayer         SkipLayer = iota
	SkipPostinstallLayer SkipLayer = iota
	SkipError            SkipLayer = iota
)

type StrategyMap

type StrategyMap map[string]AnalyzerStrategy

type SysconfigPaths

type SysconfigPaths struct {
	Stdlib  string `json:"stdlib"`
	Purelib string `json:"purelib"`
	Platlib string `json:"platlib"`
}

func FindSysconfigPaths

func FindSysconfigPaths(path string) (paths *SysconfigPaths, err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL