diff options
author | Stefan Behnel <stefan_ml@behnel.de> | 2016-08-18 15:03:00 +0200 |
---|---|---|
committer | Stefan Behnel <stefan_ml@behnel.de> | 2016-08-18 15:03:00 +0200 |
commit | 5ddce3d1fc59c77b08396eccc4810d8eef870ece (patch) | |
tree | 71f728ceb2473b82a7fd773b4789d35daf82ddf7 /tools/manylinux/build-wheels.sh | |
parent | 3ce6462f0ca2f5a59de968f6740f744a836a73e7 (diff) | |
download | python-lxml-5ddce3d1fc59c77b08396eccc4810d8eef870ece.tar.gz |
build and reuse sdist when building wheels and properly pass CFLAGS into docker container
Diffstat (limited to 'tools/manylinux/build-wheels.sh')
-rwxr-xr-x | tools/manylinux/build-wheels.sh | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/tools/manylinux/build-wheels.sh b/tools/manylinux/build-wheels.sh index eec1cffe..0ed2820f 100755 --- a/tools/manylinux/build-wheels.sh +++ b/tools/manylinux/build-wheels.sh @@ -6,14 +6,18 @@ echo "Started $0 $@" set -e -x REQUIREMENTS=/io/requirements.txt WHEELHOUSE=/io/wheelhouse +SDIST=$1 build_wheel() { + source="$1" + [ -n "$source" ] || source=/io + env STATIC_DEPS=true \ LDFLAGS="$LDFLAGS -fPIC" \ CFLAGS="$CFLAGS -fPIC" \ ${PYBIN}/pip \ wheel \ - /io \ + "$source" \ -w $WHEELHOUSE } @@ -29,17 +33,18 @@ assert_importable() { prepare_system() { yum install -y zlib-devel # Remove Python 2.6 symlinks - rm /opt/python/cp26* + rm -f /opt/python/cp26* } build_wheels() { # Compile wheels for all python versions for PYBIN in /opt/python/*/bin; do - # Install requirements if file exists - test ! -e $REQUIREMENTS \ - || ${PYBIN}/pip install -r $REQUIREMENTS + test -e "$SDIST" && source="$SDIST" || source= + # Install build requirements if we need them and file exists + test -z "$SDIST" -a -e "$REQUIREMENTS" \ + && ${PYBIN}/pip install -r "$REQUIREMENTS" - build_wheel + build_wheel "$source" done } |