@@ -166,14 +166,45 @@ jobs:
166166 # packaged form and falling back to pip: pacman's copy is what an MSYS2
167167 # user would have, and pip is what makes the step work if that package is
168168 # ever renamed.
169- - name : distlib (Windows / MSYS2)
169+ # ⚠️ TWO PYTHON PACKAGES, AND THE SECOND IS THE SUBTLEST FINDING ON THIS
170+ # LEG.
171+ #
172+ # `distlib` is the same gap macOS had. `pycotap` is different: QEMU
173+ # VENDORS its Python build dependencies as wheels under `python/wheels`
174+ # and `mkvenv` installs from there OFFLINE, never reaching PyPI. On this
175+ # host that directory is handed to pip as
176+ #
177+ # file://D:/a/qemu-x86/qemu-x86/qemu-9.2.4/python/wheels
178+ #
179+ # and pip answers `is ignored: it is neither a file nor a directory` —
180+ # a `file://` URL needs THREE slashes before a drive letter, and with two
181+ # the `D:` is parsed as a HOST. So the vendored wheels are unreachable,
182+ # and because mkvenv is offline there is no fallback:
183+ #
184+ # ERROR: No matching distribution found for pycotap==1.3.1
185+ # mkvenv was configured to operate offline and did not check PyPI.
186+ #
187+ # ⭐ THE FIX IS NOT TO REPAIR THE URL. A non-isolated virtual environment
188+ # sees the system's packages, and `mkvenv`'s own check is "is it
189+ # importable" — which is why `meson` passes on this host and `pycotap`
190+ # does not. Installing it beforehand satisfies the check the same way
191+ # meson already does, and does not depend on how QEMU spells a path.
192+ #
193+ # This is the boundary MSYS2 makes easy to trip over: the shell speaks
194+ # `/d/a/...` and the Python it ships is a NATIVE Windows build that
195+ # speaks `D:/a/...`. This repository met the same boundary from the other
196+ # side in openarch's CI, where `$PWD` in a manifest would have been the
197+ # POSIX form and mcpp wanted the native one.
198+ - name : The Python packages QEMU's mkvenv needs (Windows / MSYS2)
170199 if : runner.os == 'Windows'
171200 shell : msys2 {0}
172201 run : |
173202 pacman -S --noconfirm --needed mingw-w64-ucrt-x86_64-python-distlib \
174203 || python3 -m pip install --break-system-packages distlib \
175204 || python3 -m pip install distlib
176- python3 -c "import distlib; print('distlib', distlib.__version__)"
205+ python3 -m pip install --break-system-packages pycotap \
206+ || python3 -m pip install pycotap
207+ python3 -c "import distlib, pycotap; print('distlib', distlib.__version__, '/ pycotap ok')"
177208
178209 - name : Fetch QEMU ${{ env.QEMU_VERSION }} (Windows)
179210 if : runner.os == 'Windows'
0 commit comments