gh-116984: Install mimalloc headers#116985
Conversation
c0f3b47 to
deef17c
Compare
colesbury
left a comment
There was a problem hiding this comment.
I think we should only install the headers if Python is built with mimalloc (i.e., not configured with --without-mimalloc).
3d63aa4 to
a969e35
Compare
a969e35 to
78c228b
Compare
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
colesbury
left a comment
There was a problem hiding this comment.
This looks good to me, but I'll wait for other people to leave their feedback.
As written in the devguide, for users, the internal API is sometimes "the best workaround for a thorny problem", so we want it to compile successfully in an Python installation.
At the same time, we don't always prefix names with Py or _Py in the internal API, so including CPython internal headers can lead to language level name conflicts. In this case, if an extensions includes our internal headers and bundles mimalloc, they could run into problems. While not ideal, I don't think that's a reason not to make the internal headers compile at all in installations.
|
Hi @vstinner , would you like to help landing this? |
|
Thanks @oraluben and @colesbury! |
This PR installs mimalloc headers and allow extensions that access
pycore_*.hcontinue working.Such extensions need to explicitly add
internal/mimallocto its header search path.