Documentation ¶
Index ¶
- func ActivateVirtualEnv(environ []string, virtualEnvDir string) []string
- func Command(ctx context.Context, arg ...string) (*exec.Cmd, error)
- func CommandPath() (string, string, error)
- func InstallDependencies(ctx context.Context, root, venvDir string, showOutput bool) error
- func InstallDependenciesWithWriters(ctx context.Context, root, venvDir string, showOutput bool, ...) error
- func IsVirtualEnv(dir string) bool
- func NewVirtualEnvError(dir, fullPath string) error
- func VirtualEnvCommand(virtualEnvDir, name string, arg ...string) *exec.Cmd
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ActivateVirtualEnv ¶
ActivateVirtualEnv takes an array of environment variables (same format as os.Environ()) and path to a virtual environment directory, and returns a new "activated" array with the virtual environment's "bin" dir ("Scripts" on Windows) prepended to the `PATH` environment variable and `PYTHONHOME` variable removed.
func Command ¶
Command returns an *exec.Cmd for running `python`. Uses `ComandPath` internally to find the correct executable.
func CommandPath ¶ added in v3.12.0
CommandPath finds the correct path and command for Python. If the `PULUMI_PYTHON_CMD` variable is set it will be looked for on `PATH`, otherwise, `python3` and `python` will be looked for.
func InstallDependencies ¶
InstallDependencies will create a new virtual environment and install dependencies in the root directory.
func IsVirtualEnv ¶
IsVirtualEnv returns true if the specified directory contains a python binary.
func NewVirtualEnvError ¶
NewVirtualEnvError creates an error about the virtual environment with more info on how to resolve the issue.
Types ¶
This section is empty.