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_::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;pub use impl_::cross_compiling_from_to;pub use impl_::find_all_sysconfigdata;pub use impl_::parse_sysconfigdata;pub(crate) use env;πpub(crate) use env;πpub(crate) use process::Command;πpub(crate) use str::FromStr;πpub(crate) use sync::LazyLock;πpub(crate) use Architecture;πpub(crate) use OperatingSystem;π
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.