env

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GeneratePythonEnv

func GeneratePythonEnv(pythonHome, pythonPath string) map[string]string

func GetDepsDir

func GetDepsDir(projectPath string) string

func GetEnvConfigPath

func GetEnvConfigPath(projectPath string) string

func GetGoBinDir

func GetGoBinDir(projectPath string) string

GetGoBinDir returns the Go binary directory path relative to project path

func GetGoCacheDir

func GetGoCacheDir(projectPath string) string

GetGoCacheDir returns the Go cache directory path relative to project path

func GetGoDir

func GetGoDir(projectPath string) string

func GetGoPath

func GetGoPath(projectPath string) string

GetGoPath returns the Go path relative to project path

func GetGoRoot

func GetGoRoot(projectPath string) string

GetGoRoot returns the Go installation root path relative to project path

func GetMingwDir

func GetMingwDir(projectPath string) string

func GetMingwRoot

func GetMingwRoot(projectPath string) string

func GetPythonBinDir

func GetPythonBinDir(projectPath string) string

GetPythonBinDir returns the Python binary directory path relative to project path

func GetPythonLibDir

func GetPythonLibDir(projectPath string) string

GetPythonLibDir returns the Python library directory path relative to project path

func GetPythonPkgConfigDir

func GetPythonPkgConfigDir(projectPath string) string

GetPythonPkgConfigDir returns the pkg-config directory path relative to project path

func GetPythonRoot

func GetPythonRoot(projectPath string) string

GetPythonRoot returns the Python installation root path relative to project path

func GetTinyPkgConfigDir

func GetTinyPkgConfigDir(projectPath string) string

func ReadEnv

func ReadEnv(projectDir string) (map[string]string, error)

func ReadEnvFile

func ReadEnvFile(projectDir string) (map[string]string, error)

ReadEnvFile loads environment variables from .python/env.txt in the given directory

func SetBuildEnv

func SetBuildEnv(projectPath string)

func WriteEnvFile

func WriteEnvFile(projectPath, pythonHome, pythonPath string) error

WriteEnvFile writes environment variables to .python/env.txt

Types

type PythonEnv

type PythonEnv struct {
	Root string // Root directory of the Python installation
}

PythonEnv represents a Python environment

func NewPythonEnv

func NewPythonEnv(pythonHome string) *PythonEnv

NewPythonEnv creates a new Python environment instance

func (*PythonEnv) GetPythonPath

func (e *PythonEnv) GetPythonPath() (string, error)

func (*PythonEnv) Python

func (e *PythonEnv) Python() (string, error)

Python returns the path to the Python executable

func (*PythonEnv) RunPip

func (e *PythonEnv) RunPip(args ...string) error

RunPip executes pip with the given arguments

func (*PythonEnv) RunPython

func (e *PythonEnv) RunPython(args ...string) (string, error)

RunPython executes python with the given arguments

func (*PythonEnv) RunPythonWithOutput

func (e *PythonEnv) RunPythonWithOutput(writer io.Writer, args ...string) error

Jump to

Keyboard shortcuts

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