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

A list of python interpreter compile-time preprocessor defines that we will pick up and pass to rustc via --cfg=py_sys_config={varname}; this allows using them conditional cfg attributes in the .rs files, so

Configuration needed by PyO3 to cross-compile for a target platform.

Configuration needed by PyO3 to build for the correct Python implementation.

A target “triple”. Historically such things had three fields, though they’ve added additional fields over time.

Enums

Functions

Adds linker arguments (for macOS) suitable for PyO3’s extension-module feature.

cross_compilingDeprecated

Detect whether we are cross compiling and return an assembled CrossCompileConfig if so.

Detect whether we are cross compiling and return an assembled CrossCompileConfig if so.

Finds _sysconfigdata*.py files for detected Python interpreters.

Loads the configuration determined from the build environment.

Parse sysconfigdata file

Adds all the #[cfg] flags to the current compilation.