File: build-linux-wheels.sh

package info (click to toggle)
python-shapely 1.6.4-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 1,368 kB
  • sloc: python: 9,915; makefile: 102; sh: 31
file content (24 lines) | stat: -rwxr-xr-x 722 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/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