In CPython/Modules/Setup file, i saw a comment about how to make a module built-in, it told me to uncomment the some lines and it will compile modules statically into the Python binary, so i tried, here is my modify:
...
# math mathmodule.c
math mathmodule.c
...
I just uncomment 1 line to make math module built-in, But when I executed the python interpreter I compiled, I found that the mah module was still loaded dynamically.
╰─$ ./python
Python 3.13.0a6+ (heads/main-dirty:6078f2033ea, Apr 18 2024, 11:51:49) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import math
>>> print(math.__file__)
/home/timeplus/ssd/gitdownload/cpython/build/build/lib.linux-x86_64-3.13/math.cpython-313-x86_64-linux-gnu.so
>>>
Can any body explain?