pyqtbuild
Module Reference¶
The pyqtbuild
module provides a number of API elements that can be
used by a project’s project.py
file.
PyQtBindings
¶
-
class
pyqtbuild.
PyQtBindings
(project, name, **kwargs)¶ A
sipbuild.Bindings
sub-class that configures aQmakeBuilder
builder and supports the use of test programs to determine if a set of bindings are buildable and how they should be configured.Test programs are either internal or external. An internal test is constructed from the
test-headers
andtest-statement
keys and is compiled (but not executed) to determine if the bindings are buildable.An external test is a self contained C++ source file with the same name as the bindings with a
cfgtest_
prefix and a.cpp
extension. The source file is compiled and executed and it’s output analysed to determine if the bindings are buildable.Parameters: - project (PyQtProject) – is the project.
- name (str) – is the name of the bindings.
- **kwargs – are keyword arguments that define the initial values of
any corresponding
sipbuild.Option
defined by the bindings. Asipbuild.Option
value set in this way cannot be overridden in thepyproject.toml
file or by using a tool command line option.
-
handle_test_output
(test_output)¶ Called by the bindings to handle the output from an external test program and to determine if the bindings are buildable. The default implementation assumes that the output is a list of disabled features and that the bindings are implicitly buildable.
Parameters: test_output (list[str]) – is the output from an external test program. Returns: True
if the bindings are buildable.
PyQtProject
¶
-
class
pyqtbuild.
PyQtProject
(**kwargs)¶ A
sipbuild.Project
sub-class that provides different defaults for some keys in the[tool.sip.project]
section ofpyproject.toml
:- the default value of
bindings-factory
isPyQtBindings
- the default value of
builder-factory
isQmakeBuilder
- the default value of
sip-files-dir
issip
- the default value of
sip-module
is determined by the version of Qt - the default value of
abi-version
is determined by the value ofsip-module
.
Parameters: **kwargs – are keyword arguments that define the initial values of any corresponding sipbuild.Option
defined by the project. Asipbuild.Option
value set in this way cannot be overridden in thepyproject.toml
file or by using a tool command line option.- the default value of
QmakeBuilder
¶
-
class
pyqtbuild.
QmakeBuilder
(project, **kwargs)¶ A
sipbuild.Builder
sub-class that uses Qt’s qmake program to build and install a project.Parameters: - project (Project) – is the
sipbuild.Project
object. - **kwargs – are keyword arguments that define the initial values of
any corresponding
sipbuild.Option
defined by the project. Asipbuild.Option
value set in this way cannot be overridden in thepyproject.toml
file or by using a tool command line option.
-
qt_configuration
¶ A dict containing the Qt configuration information returned by running
qmake -query
.
- project (Project) – is the
QmakeTargetInstallable
¶
-
class
pyqtbuild.
QmakeTargetInstallable
(target, target_subdir)¶ A
sipbuild.Installable
sub-class used to describe theTARGET
of a.pro
file.Parameters: - target (str) – is the file name of the target.
- target_subdir (str) – is the relative path name of a sub-directory in which the installable’s files will be installed. If it is an absolute path name then it is used as the eventual full target directory.