Component Plugin for anyone building Qt-5.15 on macOS

Patrick Stinson patrickkidd at
Mon Oct 17 18:27:34 BST 2022

In case anyone needs it, here is a pyqtdeploy component plugin for Qt that
patches qtgui to build on macos. At least Monterey, not sure about others.
Looks like none of the 5.15 sources will build without this:

import os.path
from pyqtdeploy.sysroot.plugins.Qt import QtComponent

class DemoQtComponent(QtComponent):

def unpack_archive(self, archive, chdir=True):
""" Override to patch 5.15+ on macos
archive_root = super().unpack_archive(archive, chdir)

# Patch Qt-5.15+ on macOS.

if self.target_platform_name == 'macos':

return archive_root

def _patch_qiosurfacegraphicsbuffer(line, patch_file):
""" Qt-5.15 does not build on at least macOS Monterey.

'#include <qpa/qplatformgraphicsbuffer.h>',
'#include <CoreGraphics/CoreGraphics.h>\n#include

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the PyQt mailing list