Source
FROM stagex/pallet-rust AS build
ARG VERSION
COPY --from=stagex/pallet-python . /
COPY --from=stagex/core-py-build . /
COPY --from=stagex/core-py-cffi . /
COPY --from=stagex/core-py-pep517 . /
COPY --from=stagex/core-py-setuptools . /
COPY --from=stagex/core-py-toml . /
COPY --from=stagex/user-py-semantic-version . /
COPY --from=stagex/user-py-setuptools-rust . /
ADD fetch/maturin-${VERSION}.tar.gz .
WORKDIR /maturin-${VERSION}
ENV OPENSSL_NO_VENDOR=1
RUN MATURIN_SETUP_ARGS="--frozen" python -m build --wheel --no-isolation
RUN --network=none <<-EOF
set -eu
python -m installer --destdir=/rootfs dist/*.whl
find /rootfs | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf
install -vDm 644 license-mit /rootfs/usr/share/licenses/maturin/LICENSE
EOF
FROM stagex/core-filesystem AS package
COPY --from=build /rootfs/ /