@@ -6,11 +6,10 @@ PYTHON_VERSIONS="cp36-cp36m cp37-cp37m cp38-cp38 cp39-cp39"
66export PYTHONDONTWRITEBYTECODE=1
77
88package_name=" $1 "
9- if [[ -z " $package_name " ]]
10- then
11- # shellcheck disable=SC2210
12- & > 2 echo " Please pass package name as a first argument of this script ($0 )"
13- exit 1
9+ if [[ -z " $package_name " ]]; then
10+ # shellcheck disable=SC2210
11+ echo & > 2 " Please pass package name as a first argument of this script ($0 )"
12+ exit 1
1413fi
1514
1615arch=$( uname -m)
@@ -19,28 +18,33 @@ arch=$(uname -m)
1918rm -rf /io/.tox
2019rm -rf /io/* .egg-info
2120rm -rf /io/.pytest_cache
21+ rm -fv /io/dist/* -linux_* .whl
2222find /io/ -noleaf -name " *.py[co]" -delete
2323
2424echo
2525echo
2626echo " Compile wheels"
27- for PYTHON in ${PYTHON_VERSIONS} ; do
28- /opt/python/" ${PYTHON} " /bin/pip install -U pip setuptools
29- /opt/python/" ${PYTHON} " /bin/pip install -r /io/build_requirements.txt
30- /opt/python/" ${PYTHON} " /bin/pip wheel /io/ -w /io/dist/
31- cd /io
32- /opt/python/" ${PYTHON} " /bin/python setup.py bdist_wheel clean
27+ cd /io
3328
34- done
29+ for PYTHON in ${PYTHON_VERSIONS} ; do
30+ echo " Python ${PYTHON} ${arch} :"
31+ python_bin=" /opt/python/${PYTHON} /bin"
32+ " $python_bin /pip" install -U pip setuptools auditwheel
33+ " $python_bin /pip" install -r /io/build_requirements.txt
34+ " $python_bin /pip" wheel /io/ -w /io/dist/
35+ " $python_bin /python" setup.py bdist_wheel clean
3536
36- echo
37- echo
38- echo " Bundle external shared libraries into the wheels"
39- for whl in /io/dist/${package_name} * ${arch} .whl; do
37+ wheels=(/io/dist/" ${package_name} " * " ${PYTHON} " * linux_" ${arch} " .whl)
38+ for whl in " ${wheels[@]} " ; do
4039 echo " Repairing $whl ..."
41- auditwheel repair " $whl " -w /io/dist/
40+ " $python_bin /python" -m auditwheel repair " $whl " -w /io/dist/
41+ echo " Cleanup OS specific wheels"
42+ rm -fv " $whl "
43+ done
44+ echo
4245done
4346
47+ echo
4448echo " Cleanup OS specific wheels"
4549rm -fv /io/dist/* -linux_* .whl
4650
4953echo " Install packages and test"
5054echo " dist directory:"
5155ls /io/dist
56+ echo
5257
5358for PYTHON in ${PYTHON_VERSIONS} ; do
54- echo
55- echo -n " Test $PYTHON : $package_name "
56- /opt/python/" ${PYTHON} " /bin/python -c " import platform;print(platform.platform())"
57- /opt/python/" ${PYTHON} " /bin/pip install " $package_name " --no-index -f file:///io/dist
58- /opt/python/" ${PYTHON} " /bin/pip install pytest
59- /opt/python/" ${PYTHON} " /bin/py.test -vvv /io/test
59+ echo -n " Test $PYTHON ${arch} : $package_name "
60+ python_bin=" /opt/python/${PYTHON} /bin"
61+ " $python_bin /python" -c " import platform;print(platform.platform())"
62+ " $python_bin /pip" install " $package_name " --no-index -f file:///io/dist
63+ " $python_bin /pip" install -r /io/pytest_requirements.txt
64+ " $python_bin /py.test" -vvv /io/test
65+ echo
6066done
6167
6268find /io/dist/ -noleaf -type f -not -name " *$package_name *" -delete
0 commit comments