Source
FROM scratch AS build
ARG VERSION
COPY --from=stagex/core-busybox . /
COPY --from=stagex/core-musl . /
COPY --from=stagex/core-python . /
COPY --from=stagex/core-binutils . /
COPY --from=stagex/core-make . /
COPY --from=stagex/core-py-setuptools . /
COPY --from=stagex/core-py-installer . /
COPY --from=stagex/core-py-flit . /
COPY --from=stagex/core-py-gpep517 . /
COPY --from=stagex/core-py-wheel . /
COPY --from=stagex/core-py-distro . /
COPY --from=stagex/core-py-dateutil . /
COPY --from=stagex/core-py-urllib3 . /
COPY --from=stagex/core-py-cffi . /
COPY --from=stagex/core-zlib . /
COPY --from=stagex/core-openssl . /
COPY --from=stagex/core-libffi . /
COPY --from=stagex/core-cmake . /
COPY --from=stagex/core-gcc . /
COPY --from=stagex/user-libarchive . /
ADD fetch/py-libarchive-${VERSION}.tar.gz .
WORKDIR /python-libarchive-c-${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/ /