tmpdir=$(mktemp -d)
trap "rm -r ${tmpdir}" EXIT
-unzip -d "${tmpdir}" "${wheel}"
-find "${tmpdir}" -name \*.so | xargs strip "$@"
-(cd "${tmpdir}" && zip -fr ${wheel} *)
+cd "${tmpdir}"
+python -m zipfile -e "${wheel}" .
+
+# Busybox doesn't have "find -ls"
+find . -name \*.so | xargs ls -l
+find . -name \*.so -exec strip "$@" {} \;
+find . -name \*.so | xargs ls -l
+
+python -m zipfile -c ${wheel} *
+
+cd -
# Install PostgreSQL development files.
case "$ID" in
alpine)
- # zip is required by strip_wheel.sh
# tzdata is required for datetime tests.
- apk add --no-cache postgresql-dev tzdata zip
+ apk add --no-cache postgresql-dev tzdata
;;
+
debian)
# Note that the pgdg doesn't have an aarch64 repository so wheels are
# build with the libpq packaged with Debian 9, which is 9.6.
> /etc/apt/trusted.gpg.d/postgresql.asc
fi
apt-get update
- # zip is required by strip_wheel.sh
- apt-get -y install libpq-dev zip
+ apt-get -y install libpq-dev
;;
+
*)
echo "Unexpected Linux distribution: '$ID'" >&2
exit 1