instead phonon comes with PyKDE, installed in site-packages/PyKDE4. (although PyQt4 has the phonon-USE-Flag and not PyKDE4!) This breaks almost every python-app making use of phonon, because they import from PyQt4.phonon. I just wanted to test http://agateau.com/2012/09/03/kidmp-a-kid-friendly-media-player/ After changing PyQt4 to PyKDE4, it still fails: kidmp/PlayerPage.py", line 56, in __init__ self.mediaObject = Phonon.MediaObject(self) TypeError: MediaObject(): too many arguments because the PyKDE-phonon.sip is eather outdated or buggy - or both ;) It does not export a constructor, especially the one taking a parent-QObject. So I tried to build PyQt4 manually, specifying --enable=phonon - it gets skipped: Checking to see if the phonon module should be built... g++ -DQT_NO_DEBUG -DQT_PHONON_LIB -I. -I/usr/mkspecs/linux-g++ -I/usr/include/qt4/phonon -I/usr/include/qt4 -pipe -O2 -w -D_REENTRANT cfgtest_phonon.cpp -o cfgtest_phonon -L/usr/lib64/qt4 -Wl,-O1 -Wl,-rpath,/usr/lib64/qt4 -lphonon -lpthread In file included from cfgtest_phonon.cpp:1:0: /usr/include/phonon/videowidget.h:28:19: schwerwiegender Fehler: QWidget: Datei oder Verzeichnis nicht gefunden Kompilierung beendet. I found that configure.py appends opt.vendincdirs to the indcludedirs, but did not find how to pass it to configure. Or should media-libs/phonon get patched to include <QtModule/Class> instead of <Class>?
Created attachment 322934 [details] patch configure.py to include QtGui when checking phonon module I don't know if this is the correct way to fix the issue, at least it made PyQt4-4.9.4 compile the phonon-module.
Tested on another PC, and all went fine. There phonon-4.6.0 is installed. I am running phonon-9999. 4.6.0 includes <QtGui/QWidget>, 9999 includes <QWidget> in videowidget.h, the last one is causing the error when checking for phonon in configure.py. ASAP I will report this upstream.
The upstream of PyQt4 is not kde but Phil Thompson <phil@riverbankcomputing.com>
Yeah, I know about that. But it's kde's phonon that breaks PyQt4. qt-phonon is OK, and I think that's what PyQt4 is developing against. But as it seems kde devs don't care about that breakage (they reassigned to kde-bindings - they are in no way involved in the bug!) it probably is the best to ask PyQt4-devs to handle that...
Got an answer from phil: Sorry but KDE's phonon isn't supported by PyQt so I'm not going to implement workarounds for problems with it.
Should be fixed in PyQt4-4.10, thanks!