Documentation
¶
Overview ¶
Package pathconfig is the gopy port of cpython/Modules/getpath.py (the resolved logic, not the script itself). It computes prefix / exec_prefix / stdlib_dir / module_search_paths from the caller's PyConfig plus the discovered executable directory.
v0.7 ships the darwin and linux paths. Windows arrives later.
Index ¶
Constants ¶
const DefaultPlatlibdir = "lib"
DefaultPlatlibdir is the value config.Platlibdir falls back to when the caller leaves it empty. Mirrors PLATLIBDIR from CPython's configure script: "lib" on POSIX.
CPython: configure.ac PLATLIBDIR
const DefaultPrefix = "/usr/local"
DefaultPrefix is the compiled-in prefix CPython falls back to when the executable-dir search fails. Mirrors PREFIX from configure.
Variables ¶
This section is empty.
Functions ¶
func Resolve ¶
func Resolve(c *initconfig.PyConfig) initconfig.Status
Resolve fills the path-config outputs on c. The caller is expected to have already populated ProgramName / OrigArgv / PythonpathEnv / Home / Platlibdir / Prefix / ExecPrefix slots; Resolve only writes fields the caller has left empty so explicit overrides survive.
On any failure it returns a status error; on success c carries the fully-resolved Prefix, ExecPrefix, BasePrefix, BaseExecPrefix, StdlibDir, Executable, BaseExecutable, and ModuleSearchPaths.
CPython: Modules/getpath.py (resolved logic) CPython: Modules/getpath.c:_PyConfig_InitPathConfig
Types ¶
This section is empty.