Crate pyo3_build_config

Source
Expand description

Configuration used by PyO3 for conditional support of varying Python versions.

This crate exposes functionality to be called from build scripts to simplify building crates which depend on PyO3.

It used internally by the PyO3 crate’s build script to apply the same configuration.

Structs§

BuildFlags
A list of python interpreter compile-time preprocessor defines.
CrossCompileConfig
Configuration needed by PyO3 to cross-compile for a target platform.
InterpreterConfig
Configuration needed by PyO3 to build for the correct Python implementation.
PythonVersion
Triple
A target “triple”. Historically such things had three fields, though they’ve added additional fields over time.

Enums§

BuildFlag
PythonImplementation

Functions§

add_extension_module_link_args
Adds linker arguments suitable for PyO3’s extension-module feature.
add_python_framework_link_args
Adds linker arguments suitable for linking against the Python framework on macOS.
cross_compiling_from_to
Detect whether we are cross compiling and return an assembled CrossCompileConfig if so.
find_all_sysconfigdata
Finds _sysconfigdata*.py files for detected Python interpreters.
get
Loads the configuration determined from the build environment.
parse_sysconfigdata
Parse sysconfigdata file
use_pyo3_cfgs
Adds all the #[cfg] flags to the current compilation.