python

package
v3.33.1 Latest Latest
Warning

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

Go to latest
Published: May 19, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ActivateVirtualEnv

func ActivateVirtualEnv(environ []string, virtualEnvDir string) []string

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

func Command(arg ...string) (*exec.Cmd, error)

Command returns an *exec.Cmd for running `python`. Uses `ComandPath` internally to find the correct executable.

func CommandPath added in v3.12.0

func CommandPath() (string, string, error)

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

func InstallDependencies(root, venvDir string, showOutput bool) error

InstallDependencies will create a new virtual environment and install dependencies in the root directory.

func InstallDependenciesWithWriters

func InstallDependenciesWithWriters(root, venvDir string, showOutput bool, infoWriter, errorWriter io.Writer) error

func IsVirtualEnv

func IsVirtualEnv(dir string) bool

IsVirtualEnv returns true if the specified directory contains a python binary.

func NewVirtualEnvError

func NewVirtualEnvError(dir, fullPath string) error

NewVirtualEnvError creates an error about the virtual environment with more info on how to resolve the issue.

func VirtualEnvCommand

func VirtualEnvCommand(virtualEnvDir, name string, arg ...string) *exec.Cmd

VirtualEnvCommand returns an *exec.Cmd for running a command from the specified virtual environment directory.

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.

Jump to

Keyboard shortcuts

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