StructsΒ§
- Build
Flags - A list of python interpreter compile-time preprocessor defines.
- Cross
Compile Config - Configuration needed by PyO3 to cross-compile for a target platform.
- Cross
Compile πEnvVars - PyO3-specific cross compile environment variable values
- Interpreter
Config - Configuration needed by PyO3 to build for the correct Python implementation.
- Interpreter
Config Builder - Python
Abi - Python
AbiBuilder - Python
Version - Sysconfigdata
- Parsed data from Python sysconfigdata file
- Triple
- An LLVM target βtripleβ. Historically such things had three fields, though theyβve added additional fields over time.
EnumsΒ§
- Build
Flag - GilUsed
- Whether the ABI is for the GIL-enabled or free-threaded build.
- Python
AbiKind - The βkindβ of ABI.
- Python
Implementation - Stable
Abi - The variety of stable ABI
- Stable
AbiVersion - The target stable ABI version.
ConstantsΒ§
- MAXIMUM_
SUPPORTED_ πVERSION_ PYPY - MINIMUM_
SUPPORTED_ πVERSION - Minimum Python version PyO3 supports.
- MINIMUM_
SUPPORTED_ πVERSION_ ABI3T - MINIMUM_
SUPPORTED_ πVERSION_ GRAALPY - GraalPy may implement the same CPython version over multiple releases.
- MINIMUM_
SUPPORTED_ πVERSION_ PYPY - STABLE_
ABI_ πMAX_ MINOR - Maximum Python version that can be used as minimum required Python version with abi3.
- WINDOWS_
STABLE_ πABI_ DEBUG_ LIB_ NAME - WINDOWS_
STABLE_ πABI_ LIB_ NAME
FunctionsΒ§
- cargo_
env_ var - Gets an environment variable owned by cargo.
- conda_
env_ πinterpreter - cross_
compile_ πfrom_ sysconfigdata - Find cross compilation information from sysconfigdata file
- cross_
compiling_ from_ to - Detect whether we are cross compiling and return an assembled CrossCompileConfig if so.
- default_
cross_ πcompile - Generates βdefaultβ cross compilation information for the target.
- default_
lib_ πname_ for_ target - Generates the default library name for the target platform.
- default_
lib_ πname_ unix - default_
lib_ πname_ windows - default_
stable_ πabi_ config - Generates βdefaultβ interpreter configuration when compiling stable ABI extensions without a working Python interpreter.
- ends_
with π - env_var
- Gets an external environment variable, and registers the build script to rerun if the variable changes.
- escape π
- exact_
stable_ πabi_ version - find_
all_ sysconfigdata - Finds
_sysconfigdata*.pyfiles for detected Python interpreters. - find_
interpreter - Attempts to locate a python interpreter.
- find_
sysconfigdata π - Finds the sysconfigdata file when the target Python library directory is set.
- get_
abi3_ version - Gets the minimum supported Python version from PyO3
abi3-py*features. - get_
abi3t_ version - Gets the minimum supported Python version from PyO3
abi3t-py*features. - get_
env_ πinterpreter - get_
host_ πinterpreter - Locates and extracts the build host Python interpreter configuration.
- have_
python_ πinterpreter - Checks if we should look for a Python interpreter installation to get the target interpreter configuration.
- is_
cpython_ πlib_ dir - is_
extension_ module - Checks if the
extension-modulefeature is enabled for the PyO3 crate. - is_
graalpy_ πlib_ dir - is_
linking_ libpython_ for_ target - Checks if we need to link to
libpythonfor the target. - is_
pypy_ πlib_ dir - load_
cross_ πcompile_ config - Detects the cross compilation target interpreter configuration from all available sources (PyO3 environment variables, Python sysconfigdata, etc.).
- make_
cross_ compile_ config - Generates an interpreter config suitable for cross-compilation.
- make_
interpreter_ config - Generates an interpreter config suitable for the build host.
- parse_
script_ πoutput - parse_
sysconfigdata - Parse sysconfigdata file
- require_
libdir_ πfor_ target - Checks if we need to discover the Python library directory to link the extension module binary.
- run_
python_ πscript - Run a python script using the specified interpreter binary.
- run_
python_ πscript_ with_ envs - Run a python script using the specified interpreter binary with additional environment variables (e.g. PYTHONPATH) set.
- sanitize_
stable_ πabi_ version - search_
lib_ πdir - recursive search for _sysconfigdata, returns all possibilities of sysconfigdata paths
- starts_
with π - target_
triple_ from_ env - Gets the compilation target triple from environment variables set by Cargo.
- unescape π
- venv_
interpreter π