<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Hello,</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
I have not used sip in combination with qt before so correct me if I'm wrong.<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
I assume you are using this demo <a href="https://docs.huihoo.com/pyqt/sip4/using.html#a-more-complex-c-example" id="LPlnk639828">https://docs.huihoo.com/pyqt/sip4/using.html#a-more-complex-c-example</a> ?</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
This demo uses sip v4.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
One possibility is to use the old qt and sip version specified in the demo.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
If this is not possible ...<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
With sip v5 a lot changed in the build process. Therefore the package project example could help:</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<a href="https://www.riverbankcomputing.com/static/Docs/sip/examples.html#package-projects" id="LPlnk415368">https://www.riverbankcomputing.com/static/Docs/sip/examples.html#package-projects</a></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
You have to specify the %Import in the pyproject.toml file under'requires-dist' and if the location is not found it has to be specified with 'sip-include-dirs'.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
I'm not sure how one would do the package organisation exaclty. My guess is one would either append hello.sip example to the existing top-level qt package of QtCoremod.sip or create an own top-level package e.g. demo.sip and append hello.sip to that.<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Hope this helps.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Regards</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
M.T.<br>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>Von:</b> Suman Chatterjee <sum_chat@hotmail.com><br>
<b>Gesendet:</b> Freitag, 23. April 2021 02:10<br>
<b>An:</b> pyqt@riverbankcomputing.com <pyqt@riverbankcomputing.com><br>
<b>Betreff:</b> need help with generating python bindings </font>
<div> </div>
</div>
<style type="text/css" style="display:none">
<!--
p
{margin-top:0;
margin-bottom:0}
-->
</style>
<div dir="ltr">
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Hi,</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
I am following the hello demo to create python bindings using sip. I have installed PyQt5-5.15.4, sip-6.0.3 as below</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<p style="margin:0.0px 0.0px 0.0px 0.0px; font:11.0px Menlo; color:#000000"><span style="font-variant-ligatures:no-common-ligatures">Requirement already satisfied: toml in /usr/local/lib/python3.9/site-packages (from sip) (0.10.2)</span></p>
<p style="margin:0.0px 0.0px 0.0px 0.0px; font:11.0px Menlo; color:#000000"><span style="font-variant-ligatures:no-common-ligatures">Requirement already satisfied: pyparsing>=2.0.2 in /usr/local/lib/python3.9/site-packages (from packaging->sip) (2.4.7)</span></p>
<p style="margin:0.0px 0.0px 0.0px 0.0px; font:11.0px Menlo; color:#000000"><span style="font-variant-ligatures:no-common-ligatures">Installing collected packages: sip, PyQt5</span></p>
<p style="margin:0.0px 0.0px 0.0px 0.0px; font:11.0px Menlo; color:#000000"><span style="font-variant-ligatures:no-common-ligatures">Successfully installed PyQt5-5.15.4 sip-6.0.3</span></p>
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
I also wrote the hello.sip file as below</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span style="font-size:10pt">%Module(name=hello, language="C")</span>
<div><span style="font-size:10pt">%Import QtCore/QtCoremod.sip</span></div>
<div><span style="font-size:10pt">class Hello : QLabel {</span></div>
<div><span style="font-size:10pt">%TypeHeaderCode</span></div>
<div><span style="font-size:10pt">#include <hello.h></span></div>
<div><span style="font-size:10pt">%End</span></div>
......</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Then when I run sip-install it throws me the below error . </div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<p style="margin:0.0px 0.0px 0.0px 0.0px; font:11.0px Menlo; color:#000000"><span style="font-variant-ligatures:no-common-ligatures">VVVV:sip XXXXXX$ sip-install</span></p>
<p style="margin:0.0px 0.0px 0.0px 0.0px; font:11.0px Menlo; color:#000000"><span style="font-variant-ligatures:no-common-ligatures">These bindings will be built: hello.</span></p>
<p style="margin:0.0px 0.0px 0.0px 0.0px; font:11.0px Menlo; color:#000000"><span style="font-variant-ligatures:no-common-ligatures">Generating the hello bindings...</span></p>
<p style="margin:0.0px 0.0px 0.0px 0.0px; font:11.0px Menlo; color:#000000"><span style="font-variant-ligatures:no-common-ligatures">sip-install:
</span><span style="font-variant-ligatures:no-common-ligatures; background-color:rgb(255,255,128)">Unable to find file "QtCore/QtCoremod.sip"</span></p>
<p style="margin:0.0px 0.0px 0.0px 0.0px; font:11.0px Menlo; color:#000000"><span style="font-variant-ligatures:no-common-ligatures; background-color:rgb(255,255,128)"><br>
</span></p>
<p style="margin:0.0px 0.0px 0.0px 0.0px; font:11.0px Menlo; color:#000000"><span style="font-variant-ligatures:no-common-ligatures; background-color:rgb(255,255,128)"><span style="margin:0px; font-family:Calibri,Helvetica,sans-serif; font-size:12pt; background-color:rgb(255,255,255)">But
I verified the file exists in the path</span><br>
<span style="margin:0px; font-family:Calibri,Helvetica,sans-serif; font-size:12pt; background-color:rgb(255,255,255)">usr ▸ local ▸ lib ▸ python3.9 ▸ site-packages ▸ PyQt5 ▸ bindings ▸ QtCore</span><br>
</span></p>
<p style="margin:0.0px 0.0px 0.0px 0.0px; font:11.0px Menlo; color:#000000; min-height:13.0px">
<span style="font-variant-ligatures:no-common-ligatures"></span><br>
</p>
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
So how do I point to that bindings folder. I tried exporting that Path in my bash_profile. But it did not help.</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
I will really appreciate if anyone can please help me out</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Thank You,</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Suman</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
</div>
</body>
</html>