generate_code("QtXmlPatterns")
if "phonon" in pyqt_modules:
- generate_code("phonon")
+ # check to see if phonon is installed by Qt or external to
+ # it. adding to the include path and library path will not
+ # hurt if Qt installed phonon, and will get the headers
+ # and library if phonon was installed external to Qt.
+ sout = get_command_stdout("pkg-config --cflags-only-I --libs phonon")
+ iflags = sout.read().strip()
+ sout = get_command_stdout("%s -query QT_INSTALL_PREFIX" % opts.qmake)
+ qt_install_prefix = sout.read().strip()
+ if sys.hexversion >= 0x03000000:
+ iflags = iflags.decode()
+ qt_install_prefix = qt_install_prefix.decode()
+ for f in iflags.split():
+ # look for flags outside the Qt install prefix only
+ if f.find(qt_install_prefix) == -1:
+ phononincdirs.append(tdir)
+ if not tdir.endswith("phonon"):
+ phononincdirs.append(tdir + "/phonon")
+ elif f.startswith("-L"):
+ phononlibdirs.append(f[2:])
+ cons_xtra_incdirs.append(phononincdirs)
+ cons_xtra_libdirs.append(phononlibdirs)
+ generate_code("phonon")
+ generate_code("phonon", extra_include_dirs=phononincdirs,
+ extra_lib_dirs=phononlibdirs)
if "QtAssistant" in pyqt_modules:
generate_code("QtAssistant")
dynamic_pylib = "--enable-shared" in config_args
- if glob.glob("%s/lib/libpython%d.%d*" % (ducfg["exec_prefix"], py_major, py_minor)):
- lib_dir_flag = quote("-L%s/lib" % ducfg["exec_prefix"])
- elif 'MULTIARCH' in ducfg and glob.glob('%s/lib/%s/libpython%d.%d*' % (ducfg['exec_prefix'], ducfg['MULTIARCH'], py_major, py_minor)):
- lib_dir_flag = quote('-L%s/lib/%s' % (ducfg['exec_prefix'], ducfg['MULTIARCH']))
- elif glob.glob("%s/libpython%d.%d*" % (ducfg["LIBDIR"], py_major, py_minor)):
- lib_dir_flag = quote("-L%s" % ducfg["LIBDIR"])
- sipconfig.inform("Qt Designer plugin disabled because Python library couldn't be found")