Skip to content

Commit

Permalink
Merge pull request #1678 from PyO3/fix-aarch64-test
Browse files Browse the repository at this point in the history
Fix integration_pyo3_mixed_py_subdir test on aarch64 Linux
  • Loading branch information
messense authored Jun 24, 2023
2 parents 5182c85 + 4a6f0d4 commit 7d118cb
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 13 deletions.
16 changes: 8 additions & 8 deletions test-crates/pyo3-no-extension-module/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 10 additions & 5 deletions tests/common/integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use anyhow::{bail, Context, Result};
#[cfg(feature = "zig")]
use cargo_zigbuild::Zig;
use clap::Parser;
use maturin::{BuildOptions, PythonInterpreter};
use maturin::{BuildOptions, PlatformTag, PythonInterpreter};
use std::env;
use std::path::Path;
use std::process::Command;
Expand Down Expand Up @@ -93,14 +93,19 @@ pub fn test_integration(
// We can do this since we know that wheels are built and returned in the
// order they are in the build context
for ((filename, supported_version), python_interpreter) in wheels.iter().zip(interpreter) {
if test_zig && build_context.target.is_linux() && !build_context.target.is_musl_target() {
if test_zig
&& build_context.target.is_linux()
&& !build_context.target.is_musl_target()
&& build_context.target.get_minimum_manylinux_tag() != PlatformTag::Linux
{
let rustc_ver = rustc_version::version()?;
let python_arch = build_context.target.get_python_arch();
let file_suffix = if rustc_ver >= semver::Version::new(1, 64, 0) {
"manylinux_2_17_x86_64.manylinux2014_x86_64.whl"
format!("manylinux_2_17_{python_arch}.manylinux2014_{python_arch}.whl")
} else {
"manylinux_2_12_x86_64.manylinux2010_x86_64.whl"
format!("manylinux_2_12_{python_arch}.manylinux2010_{python_arch}.whl")
};
assert!(filename.to_string_lossy().ends_with(file_suffix))
assert!(filename.to_string_lossy().ends_with(&file_suffix))
}
let mut venv_name = if supported_version == "py3" {
format!("{unique_name}-py3")
Expand Down

0 comments on commit 7d118cb

Please sign in to comment.