#!/bin/bash
set -e -x
ln -s `which cmake28` /usr/bin/cmake
# Install dependencies needed by our wheel
yum -y install gcc libffi-devel
# Install Rust
curl https://sh.rustup.rs -sSf | sh -s -- -y
export PATH=~/.cargo/bin:$PATH
# Build wheels
which linux32 && LINUX32=linux32
$LINUX32 /opt/python/cp27-cp27mu/bin/python setup.py bdist_wheel
# Audit wheels
for wheel in dist/*-linux_*.whl; do
auditwheel repair $wheel -w dist/
rm $wheel
done