[EXTERNAL] Re: Unable to use 'sip-build --debug'

Gehlhaar, Daniel Kurt dan.gehlhaar at pfizer.com
Thu Mar 4 14:17:07 GMT 2021


Thank you, Phil.  

Is there any way to deliver these scripts as Python scripts so I can do "python sip-install.py" versus "python_d sip-install.py"?  That seems an easy solution unless I am missing something.

Regards,
Dan

-----Original Message-----
From: Phil Thompson <phil at riverbankcomputing.com> 
Sent: Thursday, March 4, 2021 4:19 AM
To: Gehlhaar, Daniel Kurt <dan.gehlhaar at pfizer.com>
Cc: 'pyqt at riverbankcomputing.com' <pyqt at riverbankcomputing.com>
Subject: [EXTERNAL] Re: Unable to use 'sip-build --debug'

On 03/03/2021 16:52, Gehlhaar, Daniel Kurt wrote:
> All,
> 
> I am unable to use "sip-build --debug" to build debuggable bindings 
> for my custom project. I am using sip installed through the commands:
> 
> pip install PyQt-builder
> pip install PyQt5-sip
> 
> and then by doing 'sip-install' in the PyQt5 source directory.
> 
> The error I get is, "sip-build: A debug version of Python must be used 
> when building a debug version of the <project> bindings".  My Python 
> installation has both debug (python_d.exe) and optimized (python.exe) 
> versions installed, as well as the corresponding libraries. However, 
> it appears that sip-build is installed as an executable (this is
> Windows) so I can't choose my Python interpreter (I don't think?) 
> because it is baked in (?).

You implicitly choose it when you chose the version of pip to install it.

Recent versions of Python have changed the way Windows debug versions are handled. This is not yet reflected in SIP.

> Anyways it's important for my build system, to allow debug and 
> optimized builds to be able to be done side by side, so I need a way 
> to toggle between these. With sip v4, I could simply do the code 
> generation and then choose my own compiler options and link libraries, 
> to select debug versus optimized Python.

Use sip-build with the --no-make option and run nmake overriding make variables on the command line (I'm assuming nmake works the same was as make in this respect).

Phil


More information about the PyQt mailing list