New submission from Jeff Moguillansky <[email protected]>:
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 <[email protected]>
<https://bugs.python.org/issue42338>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com