|
1 | 1 | #!/bin/bash |
2 | | -set -e |
| 2 | +set -e -o pipefail |
3 | 3 | PYTHON_VERSIONS="cp37-cp37m cp38-cp38 cp39-cp39 cp310-cp310" |
4 | 4 |
|
5 | 5 | # Avoid creation of __pycache__/*.py[c|o] |
@@ -28,38 +28,32 @@ cd /io |
28 | 28 | for PYTHON in ${PYTHON_VERSIONS}; do |
29 | 29 | echo "Python ${PYTHON} ${arch}:" |
30 | 30 | python_bin="/opt/python/${PYTHON}/bin" |
31 | | - "$python_bin/pip" install -U pip setuptools auditwheel |
32 | | - "$python_bin/pip" install -r /io/build_requirements.txt |
33 | | - "$python_bin/pip" wheel /io/ -w /io/dist/ |
| 31 | + pip="$python_bin/pip" |
| 32 | + "$pip" install -U pip setuptools auditwheel |
| 33 | + "$pip" install -r /io/build_requirements.txt |
| 34 | + "$pip" wheel /io/ -w /io/dist/ |
34 | 35 | "$python_bin/python" setup.py bdist_wheel clean |
35 | 36 |
|
36 | 37 | wheels=(/io/dist/"${package_name}"*"${PYTHON}"*linux_"${arch}".whl) |
37 | 38 | for whl in "${wheels[@]}"; do |
38 | 39 | echo "Repairing $whl..." |
39 | | - "$python_bin/python" -m auditwheel repair "$whl" -w /io/dist/ |
40 | | - echo "Cleanup OS specific wheels" |
41 | | - rm -fv "$whl" |
| 40 | + if "$python_bin/python" -m auditwheel repair "$whl" -w /io/dist/; then |
| 41 | + echo |
| 42 | + echo "Cleanup OS specific wheels" |
| 43 | + rm -fv "$whl" |
| 44 | + else |
| 45 | + auditwheel show "$whl" |
| 46 | + exit 1 |
| 47 | + fi |
42 | 48 | done |
43 | 49 | echo |
44 | | -done |
45 | | - |
46 | | -echo |
47 | | -echo "Cleanup OS specific wheels" |
48 | | -rm -fv /io/dist/*-linux_*.whl |
49 | | - |
50 | | -echo |
51 | | -echo |
52 | | -echo "Install packages and test" |
53 | | -echo "dist directory:" |
54 | | -ls /io/dist |
55 | | -echo |
| 50 | + echo |
56 | 51 |
|
57 | | -for PYTHON in ${PYTHON_VERSIONS}; do |
58 | 52 | echo -n "Test $PYTHON ${arch}: $package_name " |
59 | | - python_bin="/opt/python/${PYTHON}/bin" |
60 | 53 | "$python_bin/python" -c "import platform;print(platform.platform())" |
61 | | - "$python_bin/pip" install "$package_name" --no-index -f file:///io/dist |
62 | | - "$python_bin/pip" install -r /io/pytest_requirements.txt |
| 54 | + "$pip" install "$package_name" --no-index -f file:///io/dist |
| 55 | + "$pip" install -r /io/pytest_requirements.txt |
| 56 | + echo |
63 | 57 | "$python_bin/py.test" -vvv /io/test |
64 | 58 | echo |
65 | 59 | done |
|
0 commit comments