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§
- 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.
- Interpreter
Config - Configuration needed by PyO3 to build for the correct Python implementation.
- Python
Version - Triple
- A target “triple”. Historically such things had three fields, though they’ve added additional fields over time.
Enums§
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.