[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: need help with generating python bindings
From:       Suman Chatterjee <sum_chat () hotmail ! com>
Date:       2021-04-27 1:34:56
Message-ID: PS2P216MB0244F1CE57DD2198BC1B0846E5419 () PS2P216MB0244 ! KORP216 ! PROD ! OUTLOOK ! COM
[Download RAW message or body]

Hi Phil,
I have a question. I see all the sip files from PyQt are generated with the=
 help of a  software called MetaSIP. Is there a way that we can access this=
 software. We actually develop on top of Qt and we have lot of libraries an=
d all the classes derived from QObject. Wondering if there is a simpler way=
 to create the python bindings rather than having to create one .sip file c=
orresponding to each header file.
Let me know what will be the best way to do it.
Thank You,
Suman

________________________________
From: Suman Chatterjee <sum_chat@hotmail.com>
Sent: Sunday, April 25, 2021 5:50 AM
To: Phil Thompson <phil@riverbankcomputing.com>
Cc: pyqt@riverbankcomputing.com <pyqt@riverbankcomputing.com>
Subject: Re: need help with generating python bindings

It worked!!  I was missing a ReadMe file. When I created a ReadMe file it w=
orked.

Thank You so much Phill for your help!! I will try now with some other C++ =
libraries.

Suman

________________________________
From: Suman Chatterjee <sum_chat@hotmail.com>
Sent: Sunday, April 25, 2021 4:40 AM
To: Phil Thompson <phil@riverbankcomputing.com>
Cc: pyqt@riverbankcomputing.com <pyqt@riverbankcomputing.com>
Subject: Re: need help with generating python bindings

Thank You so much Phil!! I appreciate your fast response.

But I tried that already. It returns me the below error. It is able to make=
 the build but fails during install.
Is there anything I am missing.


sumxxx:bin sumxxx$ source activate pythonBindingsEnv


(pythonBindingsEnv) sumxxx:pythonBindingsEnv sumxxx$ cd sip

(pythonBindingsEnv) sumxxx:sip sumxxx$ sip-install

Querying qmake about your Qt installation...

These bindings will be built: QtChart.

Generating the QtChart bindings...

Generating the .pro file for the QtChart module...

Generating the top-level .pro file...

Generating the Makefiles...

Compiling the project...

Installing the project...

sip-install: 'make install' failed returning 2


Thank You,
Suman
________________________________
From: Phil Thompson <phil@riverbankcomputing.com>
Sent: Saturday, April 24, 2021 8:04 AM
To: Suman Chatterjee <sum_chat@hotmail.com>
Subject: Re: need help with generating python bindings

On 24/04/2021 04:45, Suman Chatterjee wrote:
> Thank You so much Phil!! I tried that example. Yes that error is gone
> and it is able to build the project using PyQt-builder
> But the install failed with the below error.
>
>
> sxxx:sip sumxxx$ sip-install --tracing
>
> Querying qmake about your Qt installation...
>
> These bindings will be built: QtChart.
>
> Generating the QtChart bindings...
>
> Generating the .pro file for the QtChart module...
>
> Generating the top-level .pro file...
>
> Generating the Makefiles...
>
> Compiling the project...
>
> Installing the project...
>
> sip-install: 'make install' failed returning 2
>
>
> if I just use sip-build it builts the project
>
> sxxx:sip sumxxx$ sip-build
>
> Querying qmake about your Qt installation...
>
> These bindings will be built: QtChart.
>
> Generating the QtChart bindings...
>
> Generating the .pro file for the QtChart module...
>
> Generating the top-level .pro file...
>
> Generating the Makefiles...
>
> Compiling the project...
>
> The project has been built.
>
>
> But how do I install in a virtual Environment. If I specify target-Dir
> like this it throws the below error
>
>
> (pythonBindingsEnv) sumanc2:sip sum10122$ sip-install --target-dir
> pythonBindingsEnv
>
> Querying qmake about your Qt installation...
>
> These bindings will be built: QtChart.
>
> Generating the QtChart bindings...
>
> sip-install: Unable to find file "QtGui/QtGuimod.sip"
>
>
> So my question what is the way to install the generated python library
> in a virtual environment

Activate the environment, then install sip, PyQt-builder etc in the
environment. There is no need to specify any additional flags.

Phil

[Attachment #3 (text/html)]

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} \
</style> </head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: \
rgb(0, 0, 0);"> Hi Phil,</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: \
rgb(0, 0, 0);"> I have a question. I see all the sip files from PyQt are generated \
with the help of a &nbsp;software called MetaSIP. Is there a way that we can access \
this software. We actually develop on top of Qt and we have lot of libraries and all \
the classes derived from QObject.  Wondering if there is a simpler way to create the \
python bindings rather than having to create one .sip file corresponding to each \
header file.</div> <div style="font-family: Calibri, Helvetica, sans-serif; \
font-size: 12pt; color: rgb(0, 0, 0);"> Let me know what will be the best way to do \
it.</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>
<div id="appendonsend"></div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; \
color:rgb(0,0,0)"> <br>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" \
style="font-size:11pt"><b>From:</b> Suman Chatterjee &lt;sum_chat@hotmail.com&gt;<br> \
<b>Sent:</b> Sunday, April 25, 2021 5:50 AM<br> <b>To:</b> Phil Thompson \
&lt;phil@riverbankcomputing.com&gt;<br> <b>Cc:</b> pyqt@riverbankcomputing.com \
&lt;pyqt@riverbankcomputing.com&gt;<br> <b>Subject:</b> Re: need help with generating \
python bindings</font> <div>&nbsp;</div>
</div>
<div dir="ltr">
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; \
color:rgb(0,0,0)"> It worked!! &nbsp;I was missing a ReadMe file. When I created a \
ReadMe file it worked.</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)"> Thank You so much Phill for your help!! I will try now with some \
other C++ libraries.</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)"> Suman&nbsp;</div>
<div>
<div id="x_appendonsend"></div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; \
color:rgb(0,0,0)"> <br>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" \
style="font-size:11pt"><b>From:</b> Suman Chatterjee &lt;sum_chat@hotmail.com&gt;<br> \
<b>Sent:</b> Sunday, April 25, 2021 4:40 AM<br> <b>To:</b> Phil Thompson \
&lt;phil@riverbankcomputing.com&gt;<br> <b>Cc:</b> pyqt@riverbankcomputing.com \
&lt;pyqt@riverbankcomputing.com&gt;<br> <b>Subject:</b> Re: need help with generating \
python bindings</font> <div>&nbsp;</div>
</div>
<div dir="ltr">
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; \
color:rgb(0,0,0)"> Thank You so much Phil!! I appreciate your fast response.</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)"> But I tried that already. It returns me the below error. It is \
able to make the build but fails during install.</div> <div \
style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)"> \
Is there anything I am missing.</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-top: 0px; margin-bottom: 0px;margin-top:0px; \
margin-bottom:0px; margin:0.0px 0.0px 0.0px 0.0px; font:11.0px Menlo; color:#000000"> \
<span style="font-variant-ligatures:no-common-ligatures">sumxxx:bin sumxxx$ source \
activate pythonBindingsEnv</span></p> <p style="margin-top: 0px; margin-bottom: \
0px;margin-top:0px; margin-bottom:0px; margin:0.0px 0.0px 0.0px 0.0px; font:11.0px \
Menlo; color:#000000"> <span style="font-variant-ligatures:no-common-ligatures"><br>
</span></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0px; margin-bottom:0px; \
margin:0.0px 0.0px 0.0px 0.0px; font:11.0px Menlo; color:#000000"> <span \
style="font-variant-ligatures:no-common-ligatures">(pythonBindingsEnv) \
sumxxx:pythonBindingsEnv sumxxx$ cd sip</span></p> <p style="margin-top: 0px; \
margin-bottom: 0px;margin-top:0px; margin-bottom:0px; margin:0.0px 0.0px 0.0px 0.0px; \
font:11.0px Menlo; color:#000000"> <span \
style="font-variant-ligatures:no-common-ligatures">(pythonBindingsEnv) sumxxx:sip \
sumxxx$ sip-install</span></p> <p style="margin-top: 0px; margin-bottom: \
0px;margin-top:0px; margin-bottom:0px; margin:0.0px 0.0px 0.0px 0.0px; font:11.0px \
Menlo; color:#000000"> <span \
style="font-variant-ligatures:no-common-ligatures">Querying qmake about your Qt \
installation...</span></p> <p style="margin-top: 0px; margin-bottom: \
0px;margin-top:0px; margin-bottom:0px; 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: QtChart.</span></p> <p style="margin-top: 0px; margin-bottom: \
0px;margin-top:0px; margin-bottom:0px; 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 QtChart \
bindings...</span></p> <p style="margin-top: 0px; margin-bottom: 0px;margin-top:0px; \
margin-bottom:0px; 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 .pro file for \
the QtChart module...</span></p> <p style="margin-top: 0px; margin-bottom: \
0px;margin-top:0px; margin-bottom:0px; 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 top-level .pro \
file...</span></p> <p style="margin-top: 0px; margin-bottom: 0px;margin-top:0px; \
margin-bottom:0px; 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 \
Makefiles...</span></p> <p style="margin-top: 0px; margin-bottom: 0px;margin-top:0px; \
margin-bottom:0px; margin:0.0px 0.0px 0.0px 0.0px; font:11.0px Menlo; color:#000000"> \
<span style="font-variant-ligatures:no-common-ligatures">Compiling the \
project...</span></p> <p style="margin-top: 0px; margin-bottom: 0px;margin-top:0px; \
margin-bottom:0px; margin:0.0px 0.0px 0.0px 0.0px; font:11.0px Menlo; color:#000000"> \
<span style="font-variant-ligatures:no-common-ligatures">Installing the \
project...</span></p> <p style="margin-top: 0px; margin-bottom: 0px;margin-top:0px; \
margin-bottom:0px; 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,0)">sip-install: 'make install' failed returning \
2</span></p> <br>
</div>
<div>
<div id="x_x_appendonsend"></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)"> Thank You,</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; \
color:rgb(0,0,0)"> Suman</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" \
color="#000000" style="font-size:11pt"><b>From:</b> Phil Thompson \
&lt;phil@riverbankcomputing.com&gt;<br> <b>Sent:</b> Saturday, April 24, 2021 8:04 \
AM<br> <b>To:</b> Suman Chatterjee &lt;sum_chat@hotmail.com&gt;<br>
<b>Subject:</b> Re: need help with generating python bindings</font>
<div>&nbsp;</div>
</div>
<div class="x_x_BodyFragment"><font size="2"><span style="font-size:11pt">
<div class="x_x_PlainText">On 24/04/2021 04:45, Suman Chatterjee wrote:<br>
&gt; Thank You so much Phil!! I tried that example. Yes that error is gone<br>
&gt; and it is able to build the project using PyQt-builder<br>
&gt; But the install failed with the below error.<br>
&gt; <br>
&gt; <br>
&gt; sxxx:sip sumxxx$ sip-install --tracing<br>
&gt; <br>
&gt; Querying qmake about your Qt installation...<br>
&gt; <br>
&gt; These bindings will be built: QtChart.<br>
&gt; <br>
&gt; Generating the QtChart bindings...<br>
&gt; <br>
&gt; Generating the .pro file for the QtChart module...<br>
&gt; <br>
&gt; Generating the top-level .pro file...<br>
&gt; <br>
&gt; Generating the Makefiles...<br>
&gt; <br>
&gt; Compiling the project...<br>
&gt; <br>
&gt; Installing the project...<br>
&gt; <br>
&gt; sip-install: 'make install' failed returning 2<br>
&gt; <br>
&gt; <br>
&gt; if I just use sip-build it builts the project<br>
&gt; <br>
&gt; sxxx:sip sumxxx$ sip-build<br>
&gt; <br>
&gt; Querying qmake about your Qt installation...<br>
&gt; <br>
&gt; These bindings will be built: QtChart.<br>
&gt; <br>
&gt; Generating the QtChart bindings...<br>
&gt; <br>
&gt; Generating the .pro file for the QtChart module...<br>
&gt; <br>
&gt; Generating the top-level .pro file...<br>
&gt; <br>
&gt; Generating the Makefiles...<br>
&gt; <br>
&gt; Compiling the project...<br>
&gt; <br>
&gt; The project has been built.<br>
&gt; <br>
&gt; <br>
&gt; But how do I install in a virtual Environment. If I specify target-Dir<br>
&gt; like this it throws the below error<br>
&gt; <br>
&gt; <br>
&gt; (pythonBindingsEnv) sumanc2:sip sum10122$ sip-install --target-dir<br>
&gt; pythonBindingsEnv<br>
&gt; <br>
&gt; Querying qmake about your Qt installation...<br>
&gt; <br>
&gt; These bindings will be built: QtChart.<br>
&gt; <br>
&gt; Generating the QtChart bindings...<br>
&gt; <br>
&gt; sip-install: Unable to find file &quot;QtGui/QtGuimod.sip&quot;<br>
&gt; <br>
&gt; <br>
&gt; So my question what is the way to install the generated python library<br>
&gt; in a virtual environment<br>
<br>
Activate the environment, then install sip, PyQt-builder etc in the <br>
environment. There is no need to specify any additional flags.<br>
<br>
Phil<br>
</div>
</span></font></div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic