Something like below can be used with sysconfig that is compatible.
>>> import os, sysconfig
>>> os.path.dirname(sysconfig.get_config_h_filename())
'/usr/include/python3.8'
>>> import distutils
>>> distutils.sysconfig.get_python_inc()
'/usr/include/python3.8
pywt/setup.py
Line 10 in b3d9d41
Ref : https://www.python.org/dev/peps/pep-0632/#migration-advice
Something like below can be used with sysconfig that is compatible.