python-pillow / Pillow

Python Imaging Library (Fork)
https://python-pillow.org
Other
12.32k stars 2.23k forks source link

Do not install Pyroma in MinGW, to use only system packages #8562

Closed radarhere closed 1 hour ago

radarhere commented 7 hours ago

MinGW has started failing in main - https://github.com/python-pillow/Pillow/actions/runs/11950775623/job/33312968743#step:4:233

error: externally-managed-environment

This environment is externally managed

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.

Also, https://www.msys2.org/docs/python/ now states

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.

so the changes from https://github.com/python-pillow/Pillow/pull/7131 and #7224 can be removed.