manylinux wheel
manylinux1 wheel を作ってみる - methaneのブログ
# PyPAが提供するmanylinux wheelビルド用Docker
FROM quay.io/pypa/manylinux1_x86_64
# psycopg2とPILのビルド用
RUN yum install -y -q postgresql-devel libjpeg-devel zlib-devel
COPY ./requirements /app/requirements
COPY ./scripts/make-wheels.sh /app/make-wheels.sh
VOLUME /app/wheelhouse /app/wheelhouse_new
WORKDIR /app/wheelhouse_new
CMD ["bash", "/app/make-wheels.sh"]
# Dockerfile.wheel 用
set -ex
WHEELHOUSE_OLD=/app/wheelhouse
WHEELHOUSE_NEW=/app/wheelhouse_new
# Python-2.7.11 (cp27mu)向けに依存パッケージをwheel化
/opt/python/cp27-cp27mu/bin/pip wheel -r /app/requirements/online.txt -f ${WHEELHOUSE_OLD} -w ${WHEELHOUSE_NEW}
# wheelのmanylinux化
cd ${WHEELHOUSE_NEW}
for f in ./*linux_*; do
if [ -f $f ]; then
auditwheel repair $f -w .
rm $f
fi
done
docker build -f Dockerfile.wheel -t pyconjp/wheelhouse:2016 .
docker run -it --rm -v `pwd`/wheelhouse:/app/wheelhouse:ro -v `pwd`/wheelhouse_new:/app/wheelhouse_new pyconjp/wheelhouse:2016
rm -R wheelhouse
mv wheelhouse_new wheelhouse