Source
FROM stagex/pallet-rust AS build
ARG VERSION
COPY --from=stagex/pallet-python . /
COPY --from=stagex/core-py-cffi . /
COPY --from=stagex/user-py-cparser . /
COPY --from=stagex/user-py-semantic-version . /
COPY --from=stagex/user-py-typing-extensions . /
COPY --from=stagex/user-py-setuptools-rust . /
ADD fetch/py-cryptography-${VERSION}.tar.gz .
WORKDIR /cryptography-${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/cryptography-*.whl
find /rootfs | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf
EOF
FROM stagex/core-filesystem AS package
COPY --from=build /rootfs/ /