pathconfig

package
v0.12.3 Latest Latest
Warning

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

Go to latest
Published: May 15, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

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

View Source
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

View Source
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

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.

Jump to

Keyboard shortcuts

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