BLD, ENH: Display compiler configuration in show_config#20939
BLD, ENH: Display compiler configuration in show_config#20939ganesh-k13 wants to merge 1 commit intonumpy:mainfrom
show_config#20939Conversation
|
This is getting a bit unwieldy. Could we add some kind of structure to the copious output? Maybe a flag |
|
Yeah completely agree. I can rework the output format for both proposed |
|
Whatever makes sense. We can spread out the work over a few PRs if the choices get complicated. |
|
Writing to a python file does not seem ideal. Let me try dumping to a YAML and reconstructing the data. Can add flexibility in display this way. I'll try it out, I'm ok to revert back anytime. Moving to draft for now. |
* Dumps compiler related configurations into an YAML file * Only C and CPP for now. WIP: Dump system info into a YAML file * This will be read later and replace the globals in `get_config` and `show` MAINT: Added generated YAMLs to .gitignore
b2ca2c0 to
6e39546
Compare
show_configshow_config
|
Sample generated YAMLs: https://gist.github.com/ganesh-k13/a7968fc287557a7fc791c9462149d2da The plan is to remove all |
|
With Meson coming in, I'm going to try something with that. Will close this for now. |
|
@ganesh-k13 here is what's probably the best way to go about using Meson for this kind of info: scipy/scipy#16803 (comment) |
|
Ah that's pretty neat! I'll start a new PR by following that issue, always wanted to refactor the |
Display Compiler Configuration
Output of
np.show_configtruncated till needed portion::Notice the extra
'-Wno-maybe-uninitialized'in case of the first output with extraCFLAGS. Not sure how and why the extra flags are coming for normal compilation :)On a side note, I tried many things, like injecting the variables into globals of
__config__.py, but given there are two files and we will depend on the fact that format does not change is risky. Moving the generation to a later time seems hard, quite frankly I don't think we can. If we do, however, we can add a subclass ofsystem_infowhich would be pretty.I wanted to add FORTRAN as well but thought let's see how this goes first.
resolves: #10983