It is not possible to build PySide2 v5.11.0 TP inside the "brew install" environment. The build stops with the following error
which is preceded by this warning:
The environment set by "brew install" passes qt headers as system headers (-isystem) and shiboken is configured to ignore such headers. In a brew install build, qt headers are then passed both as both system and non-system (-isystem/usr/local/opt/qt/include vs -i...). Oddly, almost all the modules are still capable to find the right headers with the only exception of QUiLoader class. Building works fine on the same system using the same sources if ran outside the "brew install" environment.
This issue currently prevents the creation of a pyside formula for homebrew. Workarounds for this consist in skipping the module (by adding --skip-modules=UiTools to the setup.py command), or in patching the clang header parser as
The patch also allows importing and using the PySide2.QtUiTools module in builds done inside "brew install". Thanks to Alexandru Croitor for providing both these temporary workarounds.