Documentation ¶
Index ¶
- func ActivateVirtualEnv(environ []string, virtualEnvDir string) []string
- func Command(arg ...string) (*exec.Cmd, error)
- func CommandPath() (string, string, error)
- func InstallDependencies(root, venvDir string, showOutput bool) error
- func InstallDependenciesWithWriters(root, venvDir string, showOutput bool, infoWriter, errorWriter io.Writer) 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
Find 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.
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
pulumi-language-python
pulumi-language-python serves as the "language host" for Pulumi programs written in Python.
|
pulumi-language-python serves as the "language host" for Pulumi programs written in Python. |