Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 433944 - dev-python/PyQt4 does not install phonon-module
Summary: dev-python/PyQt4 does not install phonon-module
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] KDE (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Qt Bug Alias
URL: https://bugs.kde.org/show_bug.cgi?id=...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-04 14:52 UTC by Franz Trischberger
Modified: 2013-03-12 09:10 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
patch configure.py to include QtGui when checking phonon module (phonon.patch,720 bytes, text/plain)
2012-09-04 17:04 UTC, Franz Trischberger
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Franz Trischberger 2012-09-04 14:52:31 UTC
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>?
Comment 1 Franz Trischberger 2012-09-04 17:04:07 UTC
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.
Comment 2 Franz Trischberger 2012-09-04 18:50:12 UTC
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.
Comment 3 Markos Chandras (RETIRED) gentoo-dev 2012-12-25 12:04:15 UTC
The upstream of PyQt4 is not kde but Phil Thompson <phil@riverbankcomputing.com>
Comment 4 Franz Trischberger 2012-12-25 14:37:02 UTC
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...
Comment 5 Franz Trischberger 2013-01-02 12:49:56 UTC
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.
Comment 6 Davide Pesavento gentoo-dev 2013-03-12 09:09:54 UTC
Should be fixed in PyQt4-4.10, thanks!