Debian Codegraph @

tests/manylinux_incompliant.sh

raw
1 #!/bin/bash
2 set -e
3
4 # Fail because we're running in manylinux2_28, which can't build for manylinux 2010
5 for PYBIN in /opt/python/cp3[9]*/bin; do
6 if $1 build -m test-crates/pyo3-mixed/Cargo.toml --target-dir test-crates/targets -i "${PYBIN}/python" --manylinux 2010 -o dist; then
7 echo "maturin build unexpectedly succeeded"
8 exit 1
9 else
10 echo "maturin build failed as expected"
11 fi
12 done
13
14 # Fail because we're linking zlib with black-listed symbols(gzflags), which is not allowed in manylinux
15 apt-get -v &> /dev/null && apt-get install -y zlib1g-dev || yum install -y zlib-devel
16
17 for PYBIN in /opt/python/cp3[9]*/bin; do
18 if $1 build -m test-crates/lib_with_disallowed_lib/Cargo.toml --target-dir test-crates/targets -i "${PYBIN}/python" --manylinux 2014 -o dist; then
19 echo "maturin build unexpectedly succeeded"
20 exit 1
21 else
22 echo "maturin build failed as expected"
23 fi
24 done