need help with the .toml file. /lib/python3.9/site-packages/PyQt5/bindings/QtQuick/qquickitem.sip:26:10: fatal error: 'qquickitem.h' file not found

Phil Thompson phil at riverbankcomputing.com
Mon May 3 11:08:04 BST 2021


On 02/05/2021 21:11, Suman Chatterjee wrote:
> Thank You Phil for getting back.
> 
> Yea I am  importing  only the ones I need like as below. If I do not
> import then it will throw error like
> 
> 
> sip-install: ::QQuickFramebufferObject has not been defined.
> 
> 
> %Module(name=Runtime.Qt, keyword_arguments="Optional", 
> use_limited_api=True)
> 
> ABCmod.sip
> 
> %Include Core_QList_qint64.sip
> 
> %Include Core_CoreTypes.sip
> .......
> %Include Mapping_ArcGISVectorTiledLayer.sip
> %Include Mapping_ArcGISSceneLayer.sip
> %Include Mapping_ImageAdjustmentLayer.sip
> %Include Mapping_UnknownLayer.sip
>  ........
> 
> 
> 
> %Import QtQuick/QtQuickmod.sip
> %Import QtPositioning/QtPositioningmod.sip
> %Import QtSensors/QtSensorsmod.sip
> %Import QtWidgets/QtWidgetsmod.sip
> 
> 
> 
> If I look in the file sipQtcmodule.cpp that gets generated I can see
> 
> /* This defines the types that this module needs to import from 
> QtQuick. */
> sipImportedTypeDef sipImportedTypes_Qt_QtQuick[] = {
>     {"QQuickFramebufferObject"},
>     {"QQuickFramebufferObject::Renderer"},
>     {"QQuickItem"},
>     {"QQuickItem::ItemChange"},
>     {"QQuickItem::ItemChangeData"},
>     {"QQuickItem::UpdatePaintNodeData"},
>     {"QSGNode"},
>     {"QSGTextureProvider"},
>     {SIP_NULLPTR}
> };
> 
> 
> 
> I also have the exact same .toml file like the example for the QtCharts 
> one.
> 
> # Specify the build system requirements.
> [build-system]
> requires = ["sip >=5.3, <7", "PyQt-builder >=1.6, <2"]
> build-backend = "sipbuild.api"
> 
> # Specify the PEP 566 metadata for the project.
> [tool.sip.metadata]
> name = "ABCRuntime"
> version = "100.10"
> summary = "Python bindings for the xxx Runtime library"
> home-page = "https://www.abc.com"
> author = "xxx"
> 
> license = "GPL v3"
> requires-dist = "PyQt5 (>=5.15)"
> description-file = "README"
> 
> 
> 
> # Specify a PyQt-based project.
> [tool.sip]
> project-factory = "pyqtbuild:PyQtProject"
> # Configure the project.
> [tool.sip.project]
> tag-prefix = "ABCRuntime"
> # Configure the building of the fib bindings.
> 
> [tool.sip.bindings.ABCRuntime]
> 
> Still it throws
> 
> 
> /Users/sumxxx/pythonBindingsEnv/lib/python3.9/site-packages/PyQt5/bindings/QtQuick/qquickitem.sip:26:10:
> fatal error: 'qquickitem.h' file not found
> 
> 
> What do I look for now?  I really cannot figure out what's the
> issue... It works for QtCharts but not for any other library.

Normally a set of bindings doesn't need to know anything about how any 
%Imported bindings are built because the generated code is entirely 
self-contained. However this is not the case when the /ExportDerived/ 
annotation is used - as it is by the bindings for QQuickItem. Because of 
this you need to tell the build system that your bindings need to be 
linked against QtQuick. To do this add...

qmake-QT = ["quick"]

...to the [tool.sip.bindings.ABCRuntime] section. Hopefully that will 
work.

Phil


More information about the PyQt mailing list