My understanding is that python expect that extensions doesn't link with libpython an so libpython is now behind the new --embed flag that is intended for applications embedding python not for extensions.
b4dc6a8
We have this fix for debian/ubuntu because dh complains that we were linking with libraries that were not required.
for building a python extension we should not be linking with Python, or using the python-config --ldflags we should check what settings are used by pip setup.py builds I think they get the settings from sysconfig
See https://github.com/zeroc-ice/ice/issues/635#issuecomment-554073659