FROM python:3.13-slim AS target FROM interdiode/id-configurator:latest AS configuration COPY --from=target / /src/ COPY --from=generated-config Python.yaml /config.yaml RUN id-configurator apply --config /config.yaml --src /src --dst /dst FROM target AS runtime ARG PYPI_REPO_PORT ARG PYPI_REPO_SCHEME # Warm up uv and poetry themselves from the real, network-reachable PyPI # while the default index is still in place, so the actual tests below # never need anything but the fixture repository configured by # id-configurator. (easy_install/distutils, the fourth tool the `python` # module configures, is not exercised here: both were removed from Python # itself in 3.12, and setuptools no longer ships easy_install either, so # there is no way to actually invoke it on a current interpreter.) RUN pip install --no-cache-dir uv poetry COPY --from=configuration /dst/ / RUN pip install --no-cache-dir idconfiguratortestpkg \ && python3 -c "import idconfiguratortestpkg" RUN uv pip install --system idconfiguratortestpkg \ && python3 -c "import idconfiguratortestpkg" RUN mkdir -p /tmp/poetrytest && cd /tmp/poetrytest \ && poetry init -n --name poetrytest \ && poetry source add --priority explicit demo "${PYPI_REPO_SCHEME}://host.docker.internal:${PYPI_REPO_PORT}/simple/" \ && poetry add idconfiguratortestpkg --source demo