setup-python icon indicating copy to clipboard operation
setup-python copied to clipboard

[Feature Request] Add Python debug builds with `Py_DEBUG` flag

Open XuehaiPan opened this issue 1 year ago • 1 comments

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:

Reference:

There is a Ubuntu package python-dbg built with debug flag.

Are you willing to submit a PR?

Yes

XuehaiPan avatar Jun 09 '24 18:06 XuehaiPan

Hello @XuehaiPan We appreciate your suggestion for a new feature! We'll make sure to address it when we have the opportunity

HarithaVattikuti avatar Jun 10 '24 13:06 HarithaVattikuti

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!

aparnajyothi-y avatar Jan 10 '25 07:01 aparnajyothi-y

Hello @XuehaiPan, Please let us know if you still need any more clarifications/concerns on the above.

aparnajyothi-y avatar Jan 22 '25 06:01 aparnajyothi-y

I worked around this by installing Python from source using pyenv.

XuehaiPan avatar Jan 23 '25 13:01 XuehaiPan