[Feature Request] Add Python debug builds with `Py_DEBUG` flag
Description: Describe your proposal.
Add Python debug builds with Py_DEBUG flag by setting --with-pydebug and --with-trace-refs configure options.
Justification: Justification or a use case for your proposal.
Some advanced Python development features require the Python executable to be built with extra configure flags. For example:
PYTHONDEBUG(command line option-d) requires--with-pydebug.-X showrefcountrequires--with-pydebug.PYTHONDUMPREFSrequires--with-trace-refs.PYTHONDUMPREFSFILE=FILENAMErequires--with-trace-refs.
Reference:
There is a Ubuntu package python-dbg built with debug flag.
Are you willing to submit a PR?
Yes
Hello @XuehaiPan We appreciate your suggestion for a new feature! We'll make sure to address it when we have the opportunity
Hello @XuehaiPan, Thank you for your suggestion. After careful review, we've decided to continue focusing on maintaining the core functionality of setup-python for now. While we recognize the value of enhanced debugging capabilities, the use case for Python debug builds with the Py_DEBUG flag seems to be limited to a smaller group of advanced users. Additionally, the added complexity and potential performance overhead may not provide significant value for the broader user base.
We appreciate your understanding and encourage you to keep sharing your feedback with us!
Hello @XuehaiPan, Please let us know if you still need any more clarifications/concerns on the above.
I worked around this by installing Python from source using pyenv.