[issue42338] Enable Debug Build For Python Native Modules in Windows, with Visual Studio Toolchain

2021-02-19 Thread Steve Dower


Steve Dower  added the comment:

That's the best solution.

Alternatively, you can install the debug binaries of CPython using the option 
in the installer, recompile 3rd party packages from source, and use true debug 
builds that way.

Unfortunately, there's not much we can do about 3rd party packages being 
complicated to compile. You'll have to work with those projects.

--
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42338] Enable Debug Build For Python Native Modules in Windows, with Visual Studio Toolchain

2020-11-13 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

This tracker is for developing patches to the cpython repository.  Questions 
are better asked on the python-list and occasionally the pydev mailing lists.  
I am leaving this open in case there is a doc change request lurking somewhere.

--
components: +Windows
nosy: +paul.moore, steve.dower, terry.reedy, tim.golden, zach.ware

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42338] Enable Debug Build For Python Native Modules in Windows, with Visual Studio Toolchain

2020-11-12 Thread Jeff Moguillansky


New submission from Jeff Moguillansky :

Hi,
We developed a Python module that interfaces with native code via Cython.  
We currently build on Windows with Visual Studio Toolchain. 
We encounter the following issues when trying to build a debug version:
1) 3rd party modules installed via PIP are Release mode, but Visual Studio 
toolchain doesn't allow to mix Debug and Release libs.  To workaround this 
issue, we build our module in "Release" mode, with debug symbols enabled, and 
with compiled optimization disabled (essentially a hack). 
2) To build our module we currently use the following hack:
step 1: run python.exe setup.py build --compiler=msvc
step 2: extract the output
step 3: change /Ox to /Od (disable compiler optimization)
add /Zi flag to compiler flags (enable debug symbols)
add /DEBUG flag to linker flags

Please advise what is the best solution?

--
components: Build
messages: 380861
nosy: jmoguill2
priority: normal
severity: normal
status: open
title: Enable Debug Build For Python Native Modules in Windows, with Visual 
Studio Toolchain
type: compile error
versions: Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com