-
-
Notifications
You must be signed in to change notification settings - Fork 277
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
27 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,26 @@ | ||
#!/bin/bash | ||
|
||
# Fail because we're running in manylinux2014, which can't build for manylinux 2010 | ||
for PYBIN in /opt/python/cp3[6]*/bin; do | ||
if cargo run -- build --no-sdist -m test-crates/pyo3-mixed/Cargo.toml -i "${PYBIN}/python" --manylinux 2010 -o dist; then | ||
echo "maturin build unexpectedly succeeded" | ||
exit 1 | ||
else | ||
echo "maturin build failed as expected" | ||
fi | ||
done | ||
if [[ "$1" == "2014" ]]; then | ||
for PYBIN in /opt/python/cp3[6]*/bin; do | ||
if cargo run -- build --no-sdist -m test-crates/pyo3-mixed/Cargo.toml -i "${PYBIN}/python" --manylinux 2010 -o dist; then | ||
echo "maturin build unexpectedly succeeded" | ||
exit 1 | ||
else | ||
echo "maturin build failed as expected" | ||
fi | ||
done | ||
fi | ||
|
||
# Fail because we're linking zlib, 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 | ||
echo "maturin build unexpectedly succeeded" | ||
exit 1 | ||
else | ||
echo "maturin build failed as expected" | ||
fi | ||
done | ||
if [[ "$1" == "2010" ]]; then | ||
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 2010 -o dist; then | ||
echo "maturin build unexpectedly succeeded" | ||
exit 1 | ||
else | ||
echo "maturin build failed as expected" | ||
fi | ||
done | ||
fi |