py-magic
Source
FROM stagex/pallet-cython AS build
ARG VERSION
COPY --from=stagex/user-file . /
ADD fetch/py-magic-${VERSION}.tar.gz .
WORKDIR /python-magic-${VERSION}
RUN gpep517 build-wheel --wheel-dir .dist --output-fd 3 3>&1 >&2
#
RUN --network=none <<-EOF
set -eu
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/ /Copied to clipboard!