@@ -7,36 +7,36 @@ yum install -y cmake openssl-devel gcc automake
77
88# Compile wheels
99for PYBIN in /opt/python/* /bin; do
10- # cp27-cp27mu builds fail with: undefined symbol: PyUnicodeUCS2_AsASCIIString
11- if [[ " ${PYBIN} " == * " cp27-cp27mu" * ]]; then
12- continue
13- fi
14-
1510 # Ensure a fresh build of rabbitmq-c.
16- rm -rf /workspace/rabbitmq-c/build
17- (cd /workspace && ${PYBIN} /python setup.py install)
18- ${PYBIN} /pip wheel /workspace/ -w wheelhouse/
11+ (cd /workspace && PATH= " ${PYBIN} : ${PATH} " make clean)
12+ (cd /workspace && " ${PYBIN} " /python setup.py install)
13+ " ${PYBIN} " /pip wheel /workspace/ -w wheelhouse/
1914done
2015
16+ # use a temporary directory to avoid picking up old wheels
17+ WHEELHOUSE=/workspace/wheelhouse
18+ TMP_WHEELHOUSE=$( mktemp -d -p " ${WHEELHOUSE} " )
19+
2120# Bundle external shared libraries into the wheels
2221for whl in wheelhouse/* linux* .whl; do
23- auditwheel repair $whl -w /workspace/wheelhouse/
22+ auditwheel repair " $whl " -w " ${TMP_WHEELHOUSE} "
2423done
2524
2625# Install packages and test
2726for PYBIN in /opt/python/* /bin/; do
28- if [[ " ${PYBIN} " == * " cp27-cp27mu" * ]]; then
29- continue
30- fi
27+ PYVER=$( echo " ${PYBIN} " | cut -d' /' -f 4)
3128
3229 # amqp 5.0.0a1 and vine 5.0.0a1 breaks python2
3330 # https://github.com/celery/vine/issues/34
34- if [[ " ${PYBIN } " == * " python/ cp2" * ]]; then
35- ${PYBIN} /pip install --force-reinstall " vine==1.3.0"
36- ${PYBIN} /pip install --force-reinstall " amqp==2.5.2"
31+ if [[ " ${PYVER } " == * " cp2" * ]]; then
32+ " ${PYBIN} " /pip install --force-reinstall " vine==1.3.0"
33+ " ${PYBIN} " /pip install --force-reinstall " amqp==2.5.2"
3734 fi
3835
39- ${PYBIN} /pip install librabbitmq -f /workspace/wheelhouse
40- ${PYBIN} /python -c " import librabbitmq"
36+ " ${PYBIN} " /pip install librabbitmq --no-index -f " ${TMP_WHEELHOUSE} " / * - " ${PYVER} " - * .whl
37+ " ${PYBIN} " /python -c " import librabbitmq"
4138 # (cd $HOME; ${PYBIN}/nosetests pymanylinuxdemo)
39+ mv -f " ${TMP_WHEELHOUSE} " /* -" ${PYVER} " -* .whl ${WHEELHOUSE}
4240done
41+
42+ rmdir " ${TMP_WHEELHOUSE} "
0 commit comments