Source
FROM stagex/pallet-python AS build
ARG VERSION
COPY --from=stagex/pallet-rust . /
COPY --from=stagex/user-py-semantic-version . /
COPY --from=stagex/user-py-setuptools-rust . /
ADD fetch/py-bcrypt-${VERSION}.tar.gz .
WORKDIR /bcrypt-${VERSION}/src/_bcrypt
RUN cargo fetch --locked
WORKDIR /bcrypt-${VERSION}
RUN --network=none <<-EOF
set -eu
python -m build --wheel --no-isolation
python -m installer -d /rootfs dist/*.whl
find /rootfs | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf
install -Dm644 LICENSE /rootfs/usr/share/licenses/py-bcrypt/LICENSE
EOF
FROM stagex/core-filesystem AS package
COPY --from=build /rootfs /