D22836 was tried before to fix this, but later it was found this still did not work on api.kde.org. At that time I had added some local patches on api.kde.org itself, but not getting further at one point forgot about things sadly.
That remaining patch then resulted in blocking any git pull updates as we found now (cmp, D25632#593787)
Given Python2 is EOL and to keep api.kde.org working, IMHO this hardcoding should be fine. I have no other idea how to fix this, and putting this hack upstream allows to keep api.kde.org clean from local patches.