Under using “python_undef” to shield the macro in “pyconfig.h”, the compiling of numpy failed, due to two macros “SIZEOF_VOID_P” and “LONG_BIT” which shielded by “python_undef”:
I think that the using of it should be forbidden finally, however, how to replace? If there is no way to get them now, is it needed to add the way to get them?
Perhaps you could change the subject to “Compiling of numpy failed”. I think you will attract more people to your post. There’s a different edit button to the right of the subject to edit it.
What’s your OS name and version? Is it for a Raspberry Pi or something like that?
Why are you compiling numpy if there are wheels for common operating systems already? This might shed light on the puzzle.
It is a special python environment: all of the macros which were defined in “pyconfig.h” and non-standard (not start with “Py”, “PY”, “_Py”, “_PY”) become just local in “Python.h” and won’t effect outside. To test the environment for PEP743, I made the package “python_undef” and test the famous python C-extern package in this environment. I list the four conditions:
0 means that the compiling still success.
1 means that the compiling failed due to that the project misuses these macros.
2 means that the compiling failed due to the environment of my OS (need to download many things).
-1 means that the compiling failed due to just the change and the project didn’t use any macros like these.
Now package “jpype1” match result 0, while “numpy” match the result 1.