Source
FROM stagex/pallet-python AS build
ARG VERSION
COPY --from=stagex/user-file . /
COPY --from=stagex/user-py-magic . /
COPY --from=stagex/user-py-libarchive . /
ADD fetch/diffoscope-${VERSION}.tar.gz .
WORKDIR /diffoscope-${VERSION}
RUN --network=none <<-EOF
set -eux
gpep517 build-wheel --wheel-dir .dist --output-fd 3 3>&1 >&2
python -m installer -d /rootfs .dist/*.whl
find /rootfs | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf
EOF
FROM stagex/core-filesystem AS package
COPY --from=build /rootfs/ /