Allow to debug extension modules
In the https://mail.python.org/pipermail/python-ideas/2018-January/048558.html thread, it was discovered that, stumpingly enough, it seems not possible to debug extension modules! * For a release Python, it's not even possible to build an extension without optimizations * For a debug Python, it's possible to build but not possible to install it, or any other package that depends on it Moreover, the feedback says that it makes no sense to build an extension with _DEBUG against a release Python and vice versa. But distutils' build_ext logic does (or at least trying to do since that breaks) just this, as it looks at the --debug option to `build' instead of checking the type of the running Python. Am I missing something crucial here, or do I need to fix distutils now to be able to debug a problem in my extension module? -- Regards, Ivan
On 10.01.2018 0:02, Ivan Pozdeev via Distutils-SIG wrote:
In the https://mail.python.org/pipermail/python-ideas/2018-January/048558.html thread, it was discovered that, stumpingly enough, it seems not possible to debug extension modules!
* For a release Python, it's not even possible to build an extension without optimizations
* For a debug Python, it's possible to build but not possible to install it, or any other package that depends on it I see now that it's possible to write `<...>\cpython\python.bat setup.py build --debug install' to install a single package containing an extension. pip is still broken though: try e.g. to install `scandir' (a dependency of IPython) with it.
Moreover, the feedback says that it makes no sense to build an extension with _DEBUG against a release Python and vice versa. But distutils' build_ext logic does (or at least trying to do since that breaks) just this, as it looks at the --debug option to `build' instead of checking the type of the running Python.
Am I missing something crucial here, or do I need to fix distutils now to be able to debug a problem in my extension module?
-- Regards, Ivan
participants (1)
-
Ivan Pozdeev