diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2017-01-20 07:06:03 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2017-01-20 07:06:03 -0500 |
commit | f28ab3b850586fd7531af7473ac2a93f8214d190 (patch) | |
tree | ffd0ddf98327a79b9b06b60f16703117ba49f4ad | |
parent | e60719206392ed47f28ddeadafa8319be90ae0f0 (diff) | |
download | python-coveragepy-git-f28ab3b850586fd7531af7473ac2a93f8214d190.tar.gz |
Refactor manylinux a bit. Testing doesn't work yet
--HG--
rename : ci/build_manylinux.sh => ci/manylinux.sh
-rw-r--r-- | Makefile | 4 | ||||
-rwxr-xr-x | ci/build_manylinux.sh | 27 | ||||
-rwxr-xr-x | ci/manylinux.sh | 43 |
3 files changed, 45 insertions, 29 deletions
@@ -70,8 +70,8 @@ wheel: tox -c tox_wheels.ini $(ARGS) manylinux: - docker run -v `pwd`:/io quay.io/pypa/manylinux1_x86_64 /io/ci/build_manylinux.sh - docker run -v `pwd`:/io quay.io/pypa/manylinux1_i686 /io/ci/build_manylinux.sh + docker run -v `pwd`:/io quay.io/pypa/manylinux1_x86_64 /io/ci/manylinux.sh build + docker run -v `pwd`:/io quay.io/pypa/manylinux1_i686 /io/ci/manylinux.sh build kit_upload: twine upload dist/* diff --git a/ci/build_manylinux.sh b/ci/build_manylinux.sh deleted file mode 100755 index 4ab64eb7..00000000 --- a/ci/build_manylinux.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash -# From: https://github.com/pypa/python-manylinux-demo/blob/master/travis/build-wheels.sh -# which is in the public domain. -# -# This is run inside a Centos 5 virtual machine to build manylinux wheels. - -set -e -x - -# Install a system package required by our library -yum install -y atlas-devel - -# Compile wheels -for PYBIN in /opt/python/*/bin; do - "${PYBIN}/pip" install -r /io/requirements/wheel.pip - "${PYBIN}/pip" wheel /io/ -w wheelhouse/ -done - -# Bundle external shared libraries into the wheels -for whl in wheelhouse/*.whl; do - auditwheel repair "$whl" -w /io/dist/ -done - -# Install packages and test -# for PYBIN in /opt/python/*/bin/; do -# "${PYBIN}/pip" install python-manylinux-demo --no-index -f /io/dist -# (cd "$HOME"; "${PYBIN}/nosetests" pymanylinuxdemo) -# done diff --git a/ci/manylinux.sh b/ci/manylinux.sh new file mode 100755 index 00000000..06618111 --- /dev/null +++ b/ci/manylinux.sh @@ -0,0 +1,43 @@ +#!/bin/bash +# From: https://github.com/pypa/python-manylinux-demo/blob/master/travis/build-wheels.sh +# which is in the public domain. +# +# This is run inside a CentOS 5 virtual machine to build manylinux wheels: +# +# $ docker run -v `pwd`:/io quay.io/pypa/manylinux1_x86_64 /io/ci/build_manylinux.sh +# + +set -e -x + +action=$1 + +if [[ $action == "build" ]]; then + # Compile wheels + for PYBIN in /opt/python/*/bin; do + "$PYBIN/pip" install -r /io/requirements/wheel.pip + "$PYBIN/pip" wheel /io/ -w wheelhouse/ + done + + # Bundle external shared libraries into the wheels + for whl in wheelhouse/*.whl; do + auditwheel repair "$whl" -w /io/dist/ + done + +elif [[ $action == "test" ]]; then + # Install packages and test + TOXBIN=/opt/python/cp27-cp27m/bin + "$TOXBIN/pip" install -r /io/requirements/ci.pip + + for PYBIN in /opt/python/*/bin/; do + PYNAME=$("$PYBIN/python" -c "import sys; print('python{0[0]}.{0[1]}'.format(sys.version_info))") + TOXENV=$("$PYBIN/python" -c "import sys; print('py{0[0]}{0[1]}'.format(sys.version_info))") + ln -s "$PYBIN/$PYNAME" /usr/local/bin/$PYNAME + "$TOXBIN/tox" -e $TOXENV + rm -f /usr/local/bin/$PYNAME + #"${PYBIN}/pip" install python-manylinux-demo --no-index -f /io/dist + #(cd "$HOME"; "${PYBIN}/nosetests" pymanylinuxdemo) + done + +else + echo "Need an action to perform!" +fi |