This fixes build failures on Ubuntu 24.04 in LaunchPad.
For some reason, both python3.11 and python3.12 are pulled during build and 3.12 manager build fails with missing Python.h from libpython3.12-dev.
For now, explicitly depend on libpython3.12-dev on Ubuntu 24.04, but hopefully the packaging situation improves so that this isn't necessary.