py-build

Details
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-py-setuptools . /
COPY --from=stagex/core-zlib . /
ADD fetch/py-build-${VERSION}.tar.gz .
WORKDIR /build-${VERSION}
RUN --network=none <<-EOF
	set -eu
	python setup.py install --root=/rootfs
	find /rootfs | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf
EOF
FROM stagex/core-filesystem AS package
COPY --from=build /rootfs/ /