[Python-Dev] Internal header files (Include/internal/*.h) are now installed
Victor Stinner
vstinner at redhat.com
Tue Dec 4 10:19:46 EST 2018
Hi,
Since Python 3.7, "internal" C API (only declared if Py_BUILD_CORE is
defined) are moving from Include/*.h to Include/internal/*.h. These
API must not be used outside CPython. In Python 3.7, "make install"
doesn't install them for example.
I would like to move more private functions (prefixed by "_Py") to the
"internal" API. Since I'm not 100% sure that it's ok, I decided to
modify "make install" to also install Include/internal/ headers (to
$prefix/include/python3.8m/internal/).
These headers might be useful for low-level debug tools like debuggers
or profilers, to access directly memory without calling functions.
These APIs require to use the same compiler and likely the same
compiler options than CPython. It's especially true for atomic
variables (Include/internal/pycore_atomic.h).
Are you ok to install "internal" header files? If yes, should we
modify "make install" of Python 3.7 to also install them?
Victor
More information about the Python-Dev
mailing list