Merge pull request #3559 from davidhewitt/cross-compile-link

add link to user guide to cross compile error message
This commit is contained in:
Bruno Kolenbrander 2023-10-30 23:19:08 +00:00 committed by GitHub
commit c8fdb80630
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 3 deletions

View File

@ -1361,9 +1361,13 @@ fn default_cross_compile(cross_compile_config: &CrossCompileConfig) -> Result<In
let version = cross_compile_config let version = cross_compile_config
.version .version
.or_else(get_abi3_version) .or_else(get_abi3_version)
.ok_or( .ok_or_else(||
format!(
"PYO3_CROSS_PYTHON_VERSION or an abi3-py3* feature must be specified \ "PYO3_CROSS_PYTHON_VERSION or an abi3-py3* feature must be specified \
when cross-compiling and PYO3_CROSS_LIB_DIR is not set.", when cross-compiling and PYO3_CROSS_LIB_DIR is not set.\n\
= help: see the PyO3 user guide for more information: https://pyo3.rs/v{}/building_and_distribution.html#cross-compiling",
env!("CARGO_PKG_VERSION")
)
)?; )?;
let abi3 = is_abi3(); let abi3 = is_abi3();