Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommandRunner ¶
CommandRunner executes a command and returns its combined output.
type Detector ¶
type Detector interface {
Detect(ctx context.Context) (*Environment, error)
}
Detector defines the interface for detecting a Python environment.
type Environment ¶
type Environment struct {
PythonPath string // path to the python binary
Prefix string // sys.prefix
SitePackages string // site-packages directory
PlatformTag string // e.g., "macosx-14.0-arm64"
PythonVersion string // e.g., "312"
IsVirtualEnv bool
}
Environment represents a detected Python environment.
type Option ¶
type Option func(*Service)
Option configures a Service.
func WithCommandRunner ¶
func WithCommandRunner(fn CommandRunner) Option
WithCommandRunner sets the command runner for executing external processes. Defaults to exec.CommandContext.
func WithEnvLookup ¶
WithEnvLookup sets the function used to read environment variables. Defaults to os.Getenv.
func WithPythonBin ¶
WithPythonBin sets the python binary path. Defaults to "python3".
Click to show internal directories.
Click to hide internal directories.