Codebase list python-shapely / 1b812b06-68ff-411c-8b98-56ec6fbddd36/main build-linux-wheels.sh
1b812b06-68ff-411c-8b98-56ec6fbddd36/main

Tree @1b812b06-68ff-411c-8b98-56ec6fbddd36/main (Download .tar.gz)

build-linux-wheels.sh @1b812b06-68ff-411c-8b98-56ec6fbddd36/mainraw · history · blame

#!/bin/bash
set -eu

# Checking for /.dockerenv is a hacky way to determine whether or not we're
# already running in a Docker container. Note that this is not guaranteed to
# exist in all versions and drivers and may need to be changed later.
if [ ! -e /.dockerenv ]; then
    docker build -f Dockerfile.wheels --pull -t shapely-wheelbuilder .
    exec docker run -v `pwd`:/io shapely-wheelbuilder "$@"
fi

ORIGINAL_PATH=$PATH
UNREPAIRED_WHEELS=/tmp/wheels

# Compile wheels
for PYBIN in /opt/python/*/bin; do
    PATH=${PYBIN}:$ORIGINAL_PATH
    python setup.py bdist_wheel -d ${UNREPAIRED_WHEELS}
done

# Bundle GEOS into the wheels
for whl in ${UNREPAIRED_WHEELS}/*.whl; do
    auditwheel repair ${whl} -w wheels
done