summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenry Tang <henryykt@gmail.com>2020-03-28 10:35:03 +0800
committerAsif Saif Uddin <auvipy@gmail.com>2020-03-28 10:35:00 +0600
commit9af556dda3f24eb0dd6357fd93c3a2d9af6b4d1d (patch)
tree6edda0dbd60e35bec7a144d37bd18b6dce0d3c8c
parent7c0466e1c1a5820a2f9c52ec0314de0d3354e7d8 (diff)
downloadlibrabbitmq-9af556dda3f24eb0dd6357fd93c3a2d9af6b4d1d.tar.gz
Fix manylinux1 cp27-cp27mu wheel
Ran shfmt and shcheck on build-manylinux1-wheels.sh
-rwxr-xr-xbuild-manylinux1-wheels.sh34
1 files changed, 17 insertions, 17 deletions
diff --git a/build-manylinux1-wheels.sh b/build-manylinux1-wheels.sh
index 9c534de..5423e8e 100755
--- a/build-manylinux1-wheels.sh
+++ b/build-manylinux1-wheels.sh
@@ -7,36 +7,36 @@ yum install -y cmake openssl-devel gcc automake
# Compile wheels
for PYBIN in /opt/python/*/bin; do
- # cp27-cp27mu builds fail with: undefined symbol: PyUnicodeUCS2_AsASCIIString
- if [[ "${PYBIN}" == *"cp27-cp27mu"* ]]; then
- continue
- fi
-
# Ensure a fresh build of rabbitmq-c.
- rm -rf /workspace/rabbitmq-c/build
- (cd /workspace && ${PYBIN}/python setup.py install)
- ${PYBIN}/pip wheel /workspace/ -w wheelhouse/
+ (cd /workspace && PATH="${PYBIN}:${PATH}" make clean)
+ (cd /workspace && "${PYBIN}"/python setup.py install)
+ "${PYBIN}"/pip wheel /workspace/ -w wheelhouse/
done
+# use a temporary directory to avoid picking up old wheels
+WHEELHOUSE=/workspace/wheelhouse
+TMP_WHEELHOUSE=$(mktemp -d -p "${WHEELHOUSE}")
+
# Bundle external shared libraries into the wheels
for whl in wheelhouse/*linux*.whl; do
- auditwheel repair $whl -w /workspace/wheelhouse/
+ auditwheel repair "$whl" -w "${TMP_WHEELHOUSE}"
done
# Install packages and test
for PYBIN in /opt/python/*/bin/; do
- if [[ "${PYBIN}" == *"cp27-cp27mu"* ]]; then
- continue
- fi
+ PYVER=$(echo "${PYBIN}" | cut -d'/' -f 4)
# amqp 5.0.0a1 and vine 5.0.0a1 breaks python2
# https://github.com/celery/vine/issues/34
- if [[ "${PYBIN}" == *"python/cp2"* ]]; then
- ${PYBIN}/pip install --force-reinstall "vine==1.3.0"
- ${PYBIN}/pip install --force-reinstall "amqp==2.5.2"
+ if [[ "${PYVER}" == *"cp2"* ]]; then
+ "${PYBIN}"/pip install --force-reinstall "vine==1.3.0"
+ "${PYBIN}"/pip install --force-reinstall "amqp==2.5.2"
fi
- ${PYBIN}/pip install librabbitmq -f /workspace/wheelhouse
- ${PYBIN}/python -c "import librabbitmq"
+ "${PYBIN}"/pip install librabbitmq --no-index -f "${TMP_WHEELHOUSE}"/*-"${PYVER}"-*.whl
+ "${PYBIN}"/python -c "import librabbitmq"
#(cd $HOME; ${PYBIN}/nosetests pymanylinuxdemo)
+ mv -f "${TMP_WHEELHOUSE}"/*-"${PYVER}"-*.whl ${WHEELHOUSE}
done
+
+rmdir "${TMP_WHEELHOUSE}"