Skip to content

Commit

Permalink
Adjust auditwheel tests
Browse files Browse the repository at this point in the history
  • Loading branch information
messense committed Sep 17, 2021
1 parent 64db2a6 commit c9b8e40
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions test-crates/lib_with_disallowed_lib/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
use std::os::raw::c_ulong;

use pyo3::prelude::*;

#[link(name = "z")]
extern "C" {
fn gzflags() -> c_ulong;
}

#[pyfunction]
fn add(x: usize, y: usize) -> usize {
let _version = unsafe { libz_sys::zlibVersion() };
let _flags = unsafe { gzflags() };
let sum = x + y;
sum
}
Expand Down
2 changes: 1 addition & 1 deletion tests/manylinux_incompliant.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ for PYBIN in /opt/python/cp3[6]*/bin; do
fi
done

# Fail because we're linking zlib, which is not allowed in manylinux
# Fail because we're linking zlib with black-listed symbols(gzflags), which is not allowed in manylinux
yum install -y zlib-devel
for PYBIN in /opt/python/cp3[6]*/bin; do
if cargo run -- build --no-sdist -m test-crates/lib_with_disallowed_lib/Cargo.toml -i "${PYBIN}/python" --manylinux 2014 -o dist; then
Expand Down

0 comments on commit c9b8e40

Please sign in to comment.