PyQt-builder

raw JSON →
1.19.1 verified Mon Apr 27 auth: no python

PyQt-builder is the official build system for PyQt, used to build PyQt packages from source. It provides a Qt-based build system using SIP and the Qt build tools. Current version is 1.19.1, released periodically.

pip install pyqt-builder
error ModuleNotFoundError: No module named 'pyqtbuild'
cause Trying to import 'pyqtbuild' without installing pyqt-builder.
fix
Run 'pip install pyqt-builder'.
error ImportError: cannot import name 'PyQtBuilder' from 'pyqt_builder'
cause Old code using 'pyqt_builder' which is removed in newer versions.
fix
Change import to 'from pyqtbuild import PyQtBuilder'.
error pyqtbuild.errors.QtNotFoundError: Qt qmake not found
cause Qt is not installed or not in PATH.
fix
Install Qt (e.g., via 'apt install qtbase5-dev' on Ubuntu) or set QTDIR environment variable.
breaking The import and API changed completely from pyqt-builder v1.0 to v1.1+. The package 'pyqtbuild' replaces the old 'pyqt_builder' module. Old code using 'from pyqt_builder import ...' will break.
fix Use 'from pyqtbuild import PyQtBuilder' instead of 'from pyqt_builder import PyQtBuilder'.
gotcha PyQt-builder may not build automatically if the Qt installation is not found. Users often forget to set environment variables like QTDIR or PATH.
fix Ensure Qt is installed and accessible via the system PATH or set QTDIR to the Qt root.
deprecated The 'build()' method with a single argument (source directory) is deprecated in favor of explicit configuration via 'configure()' and 'make()'.
fix Use builder.configure(...) followed by builder.make() instead of builder.build('.').

Basic usage to build a PyQt project.

from pyqtbuild import PyQtBuilder

builder = PyQtBuilder()
builder.build('.')