closes bpo-44751: Move crypt.h include from public header to _cryptmodule by geofft · Pull Request #27394 · python/cpython
Ah, thanks. I'm going to backport that then.
Yeah, I guess for static builds it makes sense the way it is, but usually that is hidden behind a "--static" flag.
FWIW, we've backported it in Gentoo safely and nothing exploded, so it should be okay for MSYS2 too.
What I think we really need/want is for packages to start using pkg-config for this, which does The Right Thing. I've considered making python-config fatal for some tests runs locally to try weed them out, but worried about the huge amount of work.
pkg-config --libs python-3.10 vs pkg-config --libs python-3.10 --static does what you'd expect.