Skip to main content

Crate pyo3_build_config

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.

Re-exportsยง

pub use impl_::cross_compiling_from_to;
pub use impl_::find_all_sysconfigdata;
pub use impl_::parse_sysconfigdata;
pub use impl_::BuildFlag;
pub use impl_::BuildFlags;
pub use impl_::CrossCompileConfig;
pub use impl_::GilUsed;
pub use impl_::InterpreterConfig;
pub use impl_::InterpreterConfigBuilder;
pub use impl_::PythonAbi;
pub use impl_::PythonAbiBuilder;
pub use impl_::PythonAbiKind;
pub use impl_::PythonImplementation;
pub use impl_::PythonVersion;
pub use impl_::StableAbi;

Modulesยง

errors ๐Ÿ”’
impl_ ๐Ÿ”’
pyo3_build_script_impl ๐Ÿ‘ป
Private exports used in PyO3โ€™s build.rs

Macrosยง

bail ๐Ÿ‘ป
A simple macro for returning an error. Resembles anyhow::bail.
ensure ๐Ÿ‘ป
A simple macro for checking a condition. Resembles anyhow::ensure.
format_warn ๐Ÿ‘ป
Format warning into string.
warn ๐Ÿ‘ป
Show warning.

Structsยง

Triple
An LLVM target โ€œtripleโ€. Historically such things had three fields, though theyโ€™ve added additional fields over time.

Functionsยง

_add_extension_module_link_args ๐Ÿ”’
_add_python_framework_link_args ๐Ÿ”’
add_extension_module_link_args
Adds linker arguments suitable for linking an extension module.
add_libpython_rpath_link_args
Adds linker arguments to set rpath when embedding Python within a Rust binary.
add_python_framework_link_args
Adds linker arguments suitable for linking against the Python framework on macOS.
get
Loads the configuration determined from the build environment.
get_inner ๐Ÿ”’
print_expected_cfgs ๐Ÿ‘ป
Registers pyo3s config names as reachable cfg expressions
rustc_minor_version ๐Ÿ”’
use_pyo3_cfgs
Adds all the #[cfg] flags to the current compilation.
โš ๏ธ Internal Docs โš ๏ธ Not Public API ๐Ÿ‘‰ Official Docs Here