Python dev images built with wrong --prefix

The images installed using python 3.9-dev get installed into /opt/python/3.9-dev/. However python-config --prefix returns /usr. This makes python-config unreliable: see for instance this failure.

You can see a working config here: an LD_LIBRARY_PATH must be specified explicitly for the -dev package, whereas python-config --prefix works well for other Python version.

I assume the problem is fixed by specifying the right --prefix when ./configure is run.