[EXTERNAL] Unable to use 'sip-build --debug'
jpe at wingware.com
Thu Mar 4 15:57:51 GMT 2021
Is there an option to keep the generated C files that normally get deleted?
> On Mar 4, 2021, at 10:43 AM, Phil Thompson <phil at riverbankcomputing.com> wrote:
> I will add support (probably SIP v6.1) that will allow you to do...
> python -m sipbuild.tools.build
> The purpose of the check for a debug build is to avoid a conflict with the use of the limited API. I'm pretty sure this conflict was removed in Python v3.8 (I'll try and resolve it in v6.1).
> In the meantime you can try setting the 'py_debug' project option in pyproject.toml. This overrides SIP's test for whether it is running under a debug build of Python.
> On 04/03/2021 14:17, Gehlhaar, Daniel Kurt wrote:
>> 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.
>> -----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:
>>> 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).
More information about the PyQt