maturin
Source
FROM stagex/pallet-rust AS build
ARG VERSION
COPY --from=stagex/pallet-python . /
COPY --from=stagex/core-py-cffi . /
COPY --from=stagex/core-py-setuptools . /
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" gpep517 build-wheel --wheel-dir .dist --output-fd 3 3>&1 >&2
RUN --network=none <<-EOF
set -eu
python -m installer --destdir=/rootfs .dist/*.whl
find /rootfs | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf
install -vDm644 -t /rootfs/usr/share/licenses/maturin/LICENSE license-mit
EOF
FROM stagex/core-filesystem AS package
COPY --from=build /rootfs/ /Copied to clipboard!