To install Python packages system-wide, try 'pacman -S
$MINGW_PACKAGE_PREFIX-python-xyz', where xyz is the package you
are trying to install.
If you wish to install a non-MSYS2-packaged Python package,
create a virtual environment using 'python -m venv path/to/venv'.
Then use path/to/venv/bin/python and path/to/venv/bin/pip.
If you wish to install a non-MSYS2 packaged Python application,
it may be easiest to use 'pipx install xyz', which will manage a
virtual environment for you. Make sure you have $MINGW_PACKAGE_PREFIX-python-pipx
installed via pacman.
pyroma is the only library that we are using that doesn't exist as a MinGW package, and since it's not used by Pillow, but is rather a tool to check Pillow only in our test suite, I think the best solution is to just not install it - using system packages would be closest to what the standard user would do.
2024-07-01: setuptools now supports building C extensions in MSYS2 since v70.2.0. Previous versions required export SETUPTOOLS_USE_DISTUTILS=stdlib as a workaround.
MinGW has started failing in main - https://github.com/python-pillow/Pillow/actions/runs/11950775623/job/33312968743#step:4:233
pyroma is the only library that we are using that doesn't exist as a MinGW package, and since it's not used by Pillow, but is rather a tool to check Pillow only in our test suite, I think the best solution is to just not install it - using system packages would be closest to what the standard user would do.
Also, https://www.msys2.org/docs/python/ now states
so the changes from https://github.com/python-pillow/Pillow/pull/7131 and #7224 can be removed.