File size: 1,151 Bytes
065fee7 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
#!/bin/bash
set -euo pipefail
package_name="$1"
if [ -z "$package_name" ]
then
>&2 echo "Please pass package name as a first argument of this script ($0)"
exit 1
fi
manylinux1_image_prefix="quay.io/pypa/manylinux1_"
dock_ext_args=""
declare -A docker_pull_pids=() # This syntax requires at least bash v4
for arch in x86_64 i686
do
docker pull "${manylinux1_image_prefix}${arch}" &
docker_pull_pids[$arch]=$!
done
echo Creating dist folder with privileges of host-machine user
mkdir -p dist # This is required to be created with host-machine user privileges
for arch in x86_64 i686
do
echo
echo
arch_pull_pid=${docker_pull_pids[$arch]}
echo Waiting for docker pull PID $arch_pull_pid to complete downloading container for $arch arch...
wait $arch_pull_pid # await for docker image for current arch to be pulled from hub
[ $arch == "i686" ] && dock_ext_args="linux32"
echo Building wheel for $arch arch
docker run --rm -v `pwd`:/io "${manylinux1_image_prefix}${arch}" $dock_ext_args /io/tools/build-wheels.sh "$package_name"
dock_ext_args="" # Reset docker args, just in case
done
set +u
|