python

package
v2.22.0 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2021 License: Apache-2.0 Imports: 8 Imported by: 2

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`. 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 added in v2.4.0

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

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

func InstallDependenciesWithWriters added in v2.15.1

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

func IsVirtualEnv added in v2.4.0

func IsVirtualEnv(dir string) bool

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

func NewVirtualEnvError added in v2.8.0

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