parameters: ()
docstring: Set the qt_dir, qt_incdir, qt_libdir, qt_bindir, qt_datadir,
      qt_pluginsdir and qt_xfeatures globals for the Qt installation.
docstring_summary: Set the qt_dir, qt_incdir, qt_libdir, qt_bindir, qt_datadir,
      qt_pluginsdir and qt_xfeatures globals for the Qt installation.
docstring_tokens: Set the qt_dir qt_incdir qt_libdir qt_bindir qt_datadir qt_pluginsdir and qt_xfeatures globals for the Qt installation .
function: def get_qt_configuration():
      """Set the qt_dir, qt_incdir, qt_libdir, qt_bindir, qt_datadir,
      qt_pluginsdir and qt_xfeatures globals for the Qt installation.
      """
      sipconfig.inform("Determining the layout of your Qt installation...")
  
      # The file names we will use to get the directory information.
      app = "qtdirs"
      pro_file = app + ".pro"
      make_file = app + ".mk"
      make_target = ""
      cpp_file = app + ".cpp"
      out_file = app + ".out"
      qmake_args = fix_qmake_args("-o " + make_file)
  
      if sys.platform == 'win32':
          exe_file = os.path.join("release", app + ".exe")
          make_target = " release"
      elif sys.platform == "darwin":
          exe_file = os.path.join(app + ".app", "Contents", "MacOS", app)
      else:
          exe_file = os.path.join(".", app)
  
      # Generate the qmake project file.
      f = open(pro_file, "w")
  
      if sipcfg.arch:
          f.write(arch_config())
  
      f.write(
  """QT = core
  # This is for certain broken Linux distros and is needed to make sure that
  # QT_SHARED is properly defined.
  CONFIG += link_prl
  TARGET = %s
  SOURCES = %s
  """ % (app, cpp_file))
  
      f.close()
  
      # Generate the source code.
      f = open(cpp_file, "w")
  
      f.write(
  """#include <QFile>
  #include <QLibraryInfo>
  #include <QTextStream>
  
  int main(int, char **)
  {
      QFile outf("%s");
  
      if (!outf.open(QIODevice::WriteOnly|QIODevice::Truncate|QIODevice::Text))
          return 1;
  
      QTextStream out(&outf);
  
      out << QLibraryInfo::location(QLibraryInfo::PrefixPath) << '\\n';
      out << QLibraryInfo::location(QLibraryInfo::HeadersPath) << '\\n';
      out << QLibraryInfo::location(QLibraryInfo::LibrariesPath) << '\\n';
      out << QLibraryInfo::location(QLibraryInfo::BinariesPath) << '\\n';
      out << QLibraryInfo::location(QLibraryInfo::DataPath) << '\\n';
      out << QLibraryInfo::location(QLibraryInfo::PluginsPath) << '\\n';
  
      out << QT_VERSION << '\\n';
      out << QT_EDITION << '\\n';
  
      out << QLibraryInfo::licensee() << '\\n';
  
  #if defined(QT_SHARED) || defined(QT_DLL)
      out << "shared\\n";
  #else
      out << "\\n";
  #endif
  
      // Determine which features should be disabled.
  
  #if defined(QT_NO_ACCESSIBILITY)
      out << "PyQt_Accessibility\\n";
  #endif
  
  #if defined(QT_NO_BIGCODECS)
      out << "PyQt_BigCodecs\\n";
  #endif
  
  #if defined(QT_NO_BUTTONGROUP)
      out << "PyQt_ButtonGroup\\n";
  #endif
  
  #if defined(QT_NO_CLIPBOARD)
      out << "PyQt_Clipboard\\n";
  #endif
  
  #if defined(QT_NO_CODECS)
      out << "PyQt_Codecs\\n";
  #endif
  
  #if defined(QT_NO_COLORDIALOG)
      out << "PyQt_ColorDialog\\n";
  #endif
  
  #if defined(QT_NO_COLORNAMES)
      out << "PyQt_ColorNames\\n";
  #endif
  
  #if defined(QT_NO_CONTEXTMENU)
      out << "PyQt_ContextMenu\\n";
  #endif
  
  #if defined(QT_NO_CURSOR)
      out << "PyQt_Cursor\\n";
  #endif
  
  #if defined(QT_NO_DIAL)
      out << "PyQt_Dial\\n";
  #endif
  
  #if defined(QT_NO_DIRECTPAINTER)
      out << "PyQt_DirectPainter\\n";
  #endif
  
  #if defined(QT_NO_DIRMODEL)
      out << "PyQt_DirModel\\n";
  #endif
  
  #if defined(QT_NO_DOCKWIDGET)
      out << "PyQt_DockWidget\\n";
  #endif
  
  #if defined(QT_NO_DOM)
      out << "PyQt_DOMClasses\\n";
  #endif
  
  #if defined(QT_NO_DRAGANDDROP)
      out << "PyQt_DragAndDrop\\n";
  #endif
  
  #if defined(QT_NO_ERRORMESSAGE)
      out << "PyQt_ErrorMessage\\n";
  #endif
  
  #if defined(QT_NO_FILEDIALOG)
      out << "PyQt_FileDialog\\n";
  #endif
  
  #if defined(QT_NO_FONTDIALOG)
      out << "PyQt_FontDialog\\n";
  #endif
  
  #if defined(QT_NO_IMAGEFORMATPLUGIN)
      out << "PyQt_ImageFormatPlugin\\n";
  #endif
  
  #if defined(QT_NO_IMAGEFORMAT_PPM)
      out << "PyQt_ImageFormat_PPM\\n";
  #endif
  
  #if defined(QT_NO_IMAGE_HEURISTIC_MASK)
      out << "PyQt_Image_Heuristic_Mask\\n";
  #endif
  
  #if defined(QT_NO_INPUTDIALOG)
      out << "PyQt_InputDialog\\n";
  #endif
  
  #if defined(QT_NO_IMAGE_TEXT)
      out << "PyQt_Image_Text\\n";
  #endif
  
  #if defined(QT_NO_ITEMVIEWS)
      out << "PyQt_ItemViews\\n";
  #endif
  
  #if defined(QT_NO_LCDNUMBER)
      out << "PyQt_LCDNumber\\n";
  #endif
  
  #if defined(QT_NO_LINEEDITMENU)
      out << "PyQt_LineEditMenu\\n";
  #endif
  
  #if defined(QT_NO_LISTVIEW)
      out << "PyQt_ListView\\n";
  #endif
  
  #if defined(QT_NO_LISTWIDGET)
      out << "PyQt_ListWidget\\n";
  #endif
  
  #if defined(QT_NO_MAINWINDOW)
      out << "PyQt_MainWindow\\n";
  #endif
  
  #if defined(QT_NO_MENU)
      out << "PyQt_Menu\\n";
  #endif
  
  #if defined(QT_NO_MENUBAR)
      out << "PyQt_MenuBar\\n";
  #endif
  
  #if defined(QT_NO_MESSAGEBOX)
      out << "PyQt_MessageBox\\n";
  #endif
  
  #if defined(QT_NO_NETWORKPROXY)
      out << "PyQt_NetworkProxy\\n";
  #endif
  
  #if defined(QT_NO_OPENSSL)
      out << "PyQt_OpenSSL\\n";
  #endif
  
  #if defined(QT_NO_PICTURE)
      out << "PyQt_Picture\\n";
  #endif
  
  #if defined(QT_NO_PRINTDIALOG)
      out << "PyQt_PrintDialog\\n";
  #endif
  
  #if defined(QT_NO_PRINTPREVIEWDIALOG)
      out << "PyQt_PrintPreviewDialog\\n";
  #endif
  
  #if defined(QT_NO_PRINTPREVIEWWIDGET)
      out << "PyQt_PrintPreviewWidget\\n";
  #endif
  
  #if defined(QT_NO_PRINTER)
      out << "PyQt_Printer\\n";
  #endif
  
  #if defined(QT_NO_PROGRESSDIALOG)
      out << "PyQt_ProgressDialog\\n";
  #endif
  
  #if defined(QT_NO_PROXYMODEL)
      out << "PyQt_ProxyModel\\n";
  #endif
  
  #if defined(QT_NO_RUBBERBAND)
      out << "PyQt_RubberBand\\n";
  #endif
  
  #if defined(QT_NO_PROCESS)
      out << "PyQt_Process\\n";
  #endif
  
  #if defined(QT_NO_QWS_ALPHA_CURSOR)
      out << "PyQt_QWS_Alpha_Cursor\\n";
  #endif
  
  #if defined(QT_NO_QWS_CURSOR)
      out << "PyQt_QWS_Cursor\\n";
  #endif
  
  #if defined(QT_NO_QWS_DECORATION_WINDOWS)
      out << "PyQt_QWS_Decoration_Windows\\n";
  #endif
  
  #if defined(QT_NO_QWS_MOUSE)
      out << "PyQt_QWS_Mouse\\n";
  #endif
  
  #if defined(QT_NO_QWS_MOUSE_AUTO)
      out << "PyQt_QWS_Mouse_Auto\\n";
  #endif
  
  #if defined(QT_NO_QWS_MOUSE_MANUAL)
      out << "PyQt_QWS_Mouse_Manual\\n";
  #endif
  
  #if defined(QT_NO_RUBBERBAND)
      out << "PyQt_RubberBand\\n";
  #endif
  
  #if defined(QT_NO_SCROLLBAR)
      out << "PyQt_ScrollBar\\n";
  #endif
  
  #if defined(QT_NO_SESSIONMANAGER)
      out << "PyQt_SessionManager\\n";
  #endif
  
  #if defined(QT_NO_SIZEGRIP)
      out << "PyQt_SizeGrip\\n";
  #endif
  
  #if defined(QT_NO_SOCKS5)
      out << "PyQt_Socks5\\n";
  #endif
  
  #if defined(QT_NO_SORTFILTERPROXYMODEL)
      out << "PyQt_SortFilterProxyModel\\n";
  #endif
  
  #if defined(QT_NO_SPLASHSCREEN)
      out << "PyQt_SplashScreen\\n";
  #endif
  
  #if defined(QT_NO_SPLITTER)
      out << "PyQt_Splitter\\n";
  #endif
  
  #if defined(QT_NO_STANDARDITEMMODEL)
      out << "PyQt_StandardItemModel\\n";
  #endif
  
  #if defined(QT_NO_STATUSBAR)
      out << "PyQt_StatusBar\\n";
  #endif
  
  #if defined(QT_NO_STATUSTIP)
      out << "PyQt_StatusTip\\n";
  #endif
  
  #if defined(QT_NO_STRINGLISTMODEL)
      out << "PyQt_StringListModel\\n";
  #endif
  
  #if defined(QT_NO_STYLE_CDE)
      out << "PyQt_Style_CDE\\n";
  #endif
  
  #if defined(QT_NO_STYLE_MOTIF)
      out << "PyQt_Style_Motif\\n";
  #endif
  
  #if defined(QT_NO_STYLE_PLASTIQUE)
      out << "PyQt_Style_Plastique\\n";
  #endif
  
  #if defined(QT_NO_STYLE_WINDOWSXP)
      out << "PyQt_Style_WindowsXP\\n";
  #endif
  
  #if defined(QT_NO_SYNTAXHIGHLIGHTER)
      out << "PyQt_SyntaxHighlighter\\n";
  #endif
  
  #if defined(QT_NO_SYSTEMTRAYICON)
      out << "PyQt_SystemTrayIcon\\n";
  #endif
  
  #if defined(QT_NO_TABBAR)
      out << "PyQt_TabBar\\n";
  #endif
  
  #if defined(QT_NO_TABDIALOG)
      out << "PyQt_TabDialog\\n";
  #endif
  
  #if defined(QT_NO_TABWIDGET)
      out << "PyQt_TabWidget\\n";
  #endif
  
  #if defined(QT_NO_TABLEVIEW)
      out << "PyQt_TableView\\n";
  #endif
  
  #if defined(QT_NO_TEXTEDITMENU)
      out << "PyQt_TextEditMenu\\n";
  #endif
  
  #if defined(QT_NO_THREAD)
      out << "PyQt_Thread\\n";
  #endif
  
  #if defined(QT_NO_TOOLBAR)
      out << "PyQt_ToolBar\\n";
  #endif
  
  #if defined(QT_NO_TOOLBOX)
      out << "PyQt_ToolBox\\n";
  #endif
  
  #if defined(QT_NO_TOOLBUTTON)
      out << "PyQt_ToolButton\\n";
  #endif
  
  #if defined(QT_NO_TOOLTIP)
      out << "PyQt_ToolTip\\n";
  #endif
  
  #if defined(QT_NO_TRANSLATION)
      out << "PyQt_Translator\\n";
  #endif
  
  #if defined(QT_NO_WHATSTHIS)
      out << "PyQt_WhatsThis\\n";
  #endif
  
  #if defined(QT_NO_WHEELEVENT)
      out << "PyQt_WheelEvent\\n";
  #endif
  
  #if defined(QT_NO_WORKSPACE)
      out << "PyQt_Workspace\\n";
  #endif
  
  #if !defined(QT3_SUPPORT) || QT_VERSION >= 0x040200
      out << "PyQt_NoPrintRangeBug\\n";
  #endif
  
  #if defined(QT_OPENGL_ES)
      out << "PyQt_NoOpenGLES\\n";
  #endif
  
      if (sizeof (qreal) != sizeof (double))
          out << "PyQt_qreal_double\\n";
  
      return 0;
  }
  """ % out_file)
  
      f.close()
  
      # Create the makefile, first making sure it doesn't already exist.
      #remove_file(make_file)
      run_command("%s %s %s" % (opts.qmake, qmake_args, pro_file))
  
      #if not os.access(make_file, os.F_OK):
      #    sipconfig.error("%s failed to create a makefile. %s" % (opts.qmake, MSG_CHECK_QMAKE))
  
      # Try and work out the name of make.
      if sipcfg.platform.startswith("win32-msvc"):
          make = "nmake"
      elif sipcfg.platform == "win32-borland":
          make = "bmake"
      elif sipcfg.platform == "win32-g++":
          make = "mingw32-make"
      else:
          make = "make"
  
      # Create the executable, first making sure it doesn't exist.
      #remove_file(exe_file)
      run_command("%s -f %s%s" % (make, make_file, make_target))
  
      #if not os.access(exe_file, os.X_OK):
      #    sipconfig.error("Failed to determine the layout of your Qt installation. Try again using the --verbose flag to see more detail about the problem.")
  
      # Create the output file, first making sure it doesn't exist.
      #remove_file(out_file)
      run_command(exe_file)
  
      #if not os.access(out_file, os.F_OK):
      #    sipconfig.error("%s failed to create %s. Make sure your Qt v4 installation is correct." % (exe_file, out_file))
  
      # Read the directories.
      f = open(out_file, "r")
      lines = f.read().strip().split("\n")
      f.close()
  
      global qt_dir, qt_incdir, qt_libdir, qt_bindir, qt_datadir, qt_pluginsdir
      global qt_version, qt_edition, qt_licensee, qt_shared, qt_xfeatures
  
      qt_dir = lines[0]
      qt_incdir = lines[1]
      qt_libdir = lines[2]
      qt_bindir = lines[3]
      qt_datadir = lines[4]
      qt_pluginsdir = lines[5]
      qt_version = lines[6]
      qt_edition = lines[7]
      qt_licensee = lines[8]
      qt_shared = lines[9]
      qt_xfeatures = lines[10:]
  
      if opts.assume_shared:
          qt_shared = "shared"
  
      # 'Nokia' is the value that is used by Maemo's version of Qt.
      if qt_licensee in ('Open Source', 'Nokia'):
          qt_licensee = None
  
      try:
          qt_version = int(qt_version)
      except ValueError:
          sipconfig.error("QT_VERSION should be a number but \"%s\" was found." % qt_version)
  
      try:
          qt_edition = int(qt_edition)
      except ValueError:
          sipconfig.error("QT_EDITION should be a number but \"%s\" was found." % qt_edition)
  
      # Now convert the edition to a descriptive string.  The order of testing is
      # important.
      if qt_edition & 0x200:
          # It has ActiveQt.
          qt_edition = "Desktop"
  
          # ActiveQt became part of the open source version in v4.5.2.
          if qt_version >= 0x040502 and qt_licensee is None:
              qt_edition = "free"
      elif qt_edition & 0x008:
          # It has OpenGL.
          qt_edition = "free"
      elif qt_edition & 0x002:
          # It has GUI.
          qt_edition = "Desktop Light"
      else:
          qt_edition = "Console"
  
      if qt_shared:
          if opts.staticplugins:
              sipconfig.inform("Static plugins are disabled because Qt has been built as shared libraries.")
              opts.staticplugins = []
      else:
          if opts.static or opts.bigqt:
              pass
          else:
              sipconfig.error("Qt has been built as static libraries so either the -g or -k argument should be used.")
function_tokens: def get_qt_configuration ( ) : sipconfig . inform ( "Determining the layout of your Qt installation..." ) # The file names we will use to get the directory information. app = "qtdirs" pro_file = app + ".pro" make_file = app + ".mk" make_target = "" cpp_file = app + ".cpp" out_file = app + ".out" qmake_args = fix_qmake_args ( "-o " + make_file ) if sys . platform == 'win32' : exe_file = os . path . join ( "release" , app + ".exe" ) make_target = " release" elif sys . platform == "darwin" : exe_file = os . path . join ( app + ".app" , "Contents" , "MacOS" , app ) else : exe_file = os . path . join ( "." , app ) # Generate the qmake project file. f = open ( pro_file , "w" ) if sipcfg . arch : f . write ( arch_config ( ) ) f . write ( """QT = core
  # This is for certain broken Linux distros and is needed to make sure that
  # QT_SHARED is properly defined.
  CONFIG += link_prl
  TARGET = %s
  SOURCES = %s
  """ % ( app , cpp_file ) ) f . close ( ) # Generate the source code. f = open ( cpp_file , "w" ) f . write ( """#include <QFile>
  #include <QLibraryInfo>
  #include <QTextStream>
  
  int main(int, char **)
  {
      QFile outf("%s");
  
      if (!outf.open(QIODevice::WriteOnly|QIODevice::Truncate|QIODevice::Text))
          return 1;
  
      QTextStream out(&outf);
  
      out << QLibraryInfo::location(QLibraryInfo::PrefixPath) << '\\n';
      out << QLibraryInfo::location(QLibraryInfo::HeadersPath) << '\\n';
      out << QLibraryInfo::location(QLibraryInfo::LibrariesPath) << '\\n';
      out << QLibraryInfo::location(QLibraryInfo::BinariesPath) << '\\n';
      out << QLibraryInfo::location(QLibraryInfo::DataPath) << '\\n';
      out << QLibraryInfo::location(QLibraryInfo::PluginsPath) << '\\n';
  
      out << QT_VERSION << '\\n';
      out << QT_EDITION << '\\n';
  
      out << QLibraryInfo::licensee() << '\\n';
  
  #if defined(QT_SHARED) || defined(QT_DLL)
      out << "shared\\n";
  #else
      out << "\\n";
  #endif
  
      // Determine which features should be disabled.
  
  #if defined(QT_NO_ACCESSIBILITY)
      out << "PyQt_Accessibility\\n";
  #endif
  
  #if defined(QT_NO_BIGCODECS)
      out << "PyQt_BigCodecs\\n";
  #endif
  
  #if defined(QT_NO_BUTTONGROUP)
      out << "PyQt_ButtonGroup\\n";
  #endif
  
  #if defined(QT_NO_CLIPBOARD)
      out << "PyQt_Clipboard\\n";
  #endif
  
  #if defined(QT_NO_CODECS)
      out << "PyQt_Codecs\\n";
  #endif
  
  #if defined(QT_NO_COLORDIALOG)
      out << "PyQt_ColorDialog\\n";
  #endif
  
  #if defined(QT_NO_COLORNAMES)
      out << "PyQt_ColorNames\\n";
  #endif
  
  #if defined(QT_NO_CONTEXTMENU)
      out << "PyQt_ContextMenu\\n";
  #endif
  
  #if defined(QT_NO_CURSOR)
      out << "PyQt_Cursor\\n";
  #endif
  
  #if defined(QT_NO_DIAL)
      out << "PyQt_Dial\\n";
  #endif
  
  #if defined(QT_NO_DIRECTPAINTER)
      out << "PyQt_DirectPainter\\n";
  #endif
  
  #if defined(QT_NO_DIRMODEL)
      out << "PyQt_DirModel\\n";
  #endif
  
  #if defined(QT_NO_DOCKWIDGET)
      out << "PyQt_DockWidget\\n";
  #endif
  
  #if defined(QT_NO_DOM)
      out << "PyQt_DOMClasses\\n";
  #endif
  
  #if defined(QT_NO_DRAGANDDROP)
      out << "PyQt_DragAndDrop\\n";
  #endif
  
  #if defined(QT_NO_ERRORMESSAGE)
      out << "PyQt_ErrorMessage\\n";
  #endif
  
  #if defined(QT_NO_FILEDIALOG)
      out << "PyQt_FileDialog\\n";
  #endif
  
  #if defined(QT_NO_FONTDIALOG)
      out << "PyQt_FontDialog\\n";
  #endif
  
  #if defined(QT_NO_IMAGEFORMATPLUGIN)
      out << "PyQt_ImageFormatPlugin\\n";
  #endif
  
  #if defined(QT_NO_IMAGEFORMAT_PPM)
      out << "PyQt_ImageFormat_PPM\\n";
  #endif
  
  #if defined(QT_NO_IMAGE_HEURISTIC_MASK)
      out << "PyQt_Image_Heuristic_Mask\\n";
  #endif
  
  #if defined(QT_NO_INPUTDIALOG)
      out << "PyQt_InputDialog\\n";
  #endif
  
  #if defined(QT_NO_IMAGE_TEXT)
      out << "PyQt_Image_Text\\n";
  #endif
  
  #if defined(QT_NO_ITEMVIEWS)
      out << "PyQt_ItemViews\\n";
  #endif
  
  #if defined(QT_NO_LCDNUMBER)
      out << "PyQt_LCDNumber\\n";
  #endif
  
  #if defined(QT_NO_LINEEDITMENU)
      out << "PyQt_LineEditMenu\\n";
  #endif
  
  #if defined(QT_NO_LISTVIEW)
      out << "PyQt_ListView\\n";
  #endif
  
  #if defined(QT_NO_LISTWIDGET)
      out << "PyQt_ListWidget\\n";
  #endif
  
  #if defined(QT_NO_MAINWINDOW)
      out << "PyQt_MainWindow\\n";
  #endif
  
  #if defined(QT_NO_MENU)
      out << "PyQt_Menu\\n";
  #endif
  
  #if defined(QT_NO_MENUBAR)
      out << "PyQt_MenuBar\\n";
  #endif
  
  #if defined(QT_NO_MESSAGEBOX)
      out << "PyQt_MessageBox\\n";
  #endif
  
  #if defined(QT_NO_NETWORKPROXY)
      out << "PyQt_NetworkProxy\\n";
  #endif
  
  #if defined(QT_NO_OPENSSL)
      out << "PyQt_OpenSSL\\n";
  #endif
  
  #if defined(QT_NO_PICTURE)
      out << "PyQt_Picture\\n";
  #endif
  
  #if defined(QT_NO_PRINTDIALOG)
      out << "PyQt_PrintDialog\\n";
  #endif
  
  #if defined(QT_NO_PRINTPREVIEWDIALOG)
      out << "PyQt_PrintPreviewDialog\\n";
  #endif
  
  #if defined(QT_NO_PRINTPREVIEWWIDGET)
      out << "PyQt_PrintPreviewWidget\\n";
  #endif
  
  #if defined(QT_NO_PRINTER)
      out << "PyQt_Printer\\n";
  #endif
  
  #if defined(QT_NO_PROGRESSDIALOG)
      out << "PyQt_ProgressDialog\\n";
  #endif
  
  #if defined(QT_NO_PROXYMODEL)
      out << "PyQt_ProxyModel\\n";
  #endif
  
  #if defined(QT_NO_RUBBERBAND)
      out << "PyQt_RubberBand\\n";
  #endif
  
  #if defined(QT_NO_PROCESS)
      out << "PyQt_Process\\n";
  #endif
  
  #if defined(QT_NO_QWS_ALPHA_CURSOR)
      out << "PyQt_QWS_Alpha_Cursor\\n";
  #endif
  
  #if defined(QT_NO_QWS_CURSOR)
      out << "PyQt_QWS_Cursor\\n";
  #endif
  
  #if defined(QT_NO_QWS_DECORATION_WINDOWS)
      out << "PyQt_QWS_Decoration_Windows\\n";
  #endif
  
  #if defined(QT_NO_QWS_MOUSE)
      out << "PyQt_QWS_Mouse\\n";
  #endif
  
  #if defined(QT_NO_QWS_MOUSE_AUTO)
      out << "PyQt_QWS_Mouse_Auto\\n";
  #endif
  
  #if defined(QT_NO_QWS_MOUSE_MANUAL)
      out << "PyQt_QWS_Mouse_Manual\\n";
  #endif
  
  #if defined(QT_NO_RUBBERBAND)
      out << "PyQt_RubberBand\\n";
  #endif
  
  #if defined(QT_NO_SCROLLBAR)
      out << "PyQt_ScrollBar\\n";
  #endif
  
  #if defined(QT_NO_SESSIONMANAGER)
      out << "PyQt_SessionManager\\n";
  #endif
  
  #if defined(QT_NO_SIZEGRIP)
      out << "PyQt_SizeGrip\\n";
  #endif
  
  #if defined(QT_NO_SOCKS5)
      out << "PyQt_Socks5\\n";
  #endif
  
  #if defined(QT_NO_SORTFILTERPROXYMODEL)
      out << "PyQt_SortFilterProxyModel\\n";
  #endif
  
  #if defined(QT_NO_SPLASHSCREEN)
      out << "PyQt_SplashScreen\\n";
  #endif
  
  #if defined(QT_NO_SPLITTER)
      out << "PyQt_Splitter\\n";
  #endif
  
  #if defined(QT_NO_STANDARDITEMMODEL)
      out << "PyQt_StandardItemModel\\n";
  #endif
  
  #if defined(QT_NO_STATUSBAR)
      out << "PyQt_StatusBar\\n";
  #endif
  
  #if defined(QT_NO_STATUSTIP)
      out << "PyQt_StatusTip\\n";
  #endif
  
  #if defined(QT_NO_STRINGLISTMODEL)
      out << "PyQt_StringListModel\\n";
  #endif
  
  #if defined(QT_NO_STYLE_CDE)
      out << "PyQt_Style_CDE\\n";
  #endif
  
  #if defined(QT_NO_STYLE_MOTIF)
      out << "PyQt_Style_Motif\\n";
  #endif
  
  #if defined(QT_NO_STYLE_PLASTIQUE)
      out << "PyQt_Style_Plastique\\n";
  #endif
  
  #if defined(QT_NO_STYLE_WINDOWSXP)
      out << "PyQt_Style_WindowsXP\\n";
  #endif
  
  #if defined(QT_NO_SYNTAXHIGHLIGHTER)
      out << "PyQt_SyntaxHighlighter\\n";
  #endif
  
  #if defined(QT_NO_SYSTEMTRAYICON)
      out << "PyQt_SystemTrayIcon\\n";
  #endif
  
  #if defined(QT_NO_TABBAR)
      out << "PyQt_TabBar\\n";
  #endif
  
  #if defined(QT_NO_TABDIALOG)
      out << "PyQt_TabDialog\\n";
  #endif
  
  #if defined(QT_NO_TABWIDGET)
      out << "PyQt_TabWidget\\n";
  #endif
  
  #if defined(QT_NO_TABLEVIEW)
      out << "PyQt_TableView\\n";
  #endif
  
  #if defined(QT_NO_TEXTEDITMENU)
      out << "PyQt_TextEditMenu\\n";
  #endif
  
  #if defined(QT_NO_THREAD)
      out << "PyQt_Thread\\n";
  #endif
  
  #if defined(QT_NO_TOOLBAR)
      out << "PyQt_ToolBar\\n";
  #endif
  
  #if defined(QT_NO_TOOLBOX)
      out << "PyQt_ToolBox\\n";
  #endif
  
  #if defined(QT_NO_TOOLBUTTON)
      out << "PyQt_ToolButton\\n";
  #endif
  
  #if defined(QT_NO_TOOLTIP)
      out << "PyQt_ToolTip\\n";
  #endif
  
  #if defined(QT_NO_TRANSLATION)
      out << "PyQt_Translator\\n";
  #endif
  
  #if defined(QT_NO_WHATSTHIS)
      out << "PyQt_WhatsThis\\n";
  #endif
  
  #if defined(QT_NO_WHEELEVENT)
      out << "PyQt_WheelEvent\\n";
  #endif
  
  #if defined(QT_NO_WORKSPACE)
      out << "PyQt_Workspace\\n";
  #endif
  
  #if !defined(QT3_SUPPORT) || QT_VERSION >= 0x040200
      out << "PyQt_NoPrintRangeBug\\n";
  #endif
  
  #if defined(QT_OPENGL_ES)
      out << "PyQt_NoOpenGLES\\n";
  #endif
  
      if (sizeof (qreal) != sizeof (double))
          out << "PyQt_qreal_double\\n";
  
      return 0;
  }
  """ % out_file ) f . close ( ) # Create the makefile, first making sure it doesn't already exist. #remove_file(make_file) run_command ( "%s %s %s" % ( opts . qmake , qmake_args , pro_file ) ) #if not os.access(make_file, os.F_OK): #    sipconfig.error("%s failed to create a makefile. %s" % (opts.qmake, MSG_CHECK_QMAKE)) # Try and work out the name of make. if sipcfg . platform . startswith ( "win32-msvc" ) : make = "nmake" elif sipcfg . platform == "win32-borland" : make = "bmake" elif sipcfg . platform == "win32-g++" : make = "mingw32-make" else : make = "make" # Create the executable, first making sure it doesn't exist. #remove_file(exe_file) run_command ( "%s -f %s%s" % ( make , make_file , make_target ) ) #if not os.access(exe_file, os.X_OK): #    sipconfig.error("Failed to determine the layout of your Qt installation. Try again using the --verbose flag to see more detail about the problem.") # Create the output file, first making sure it doesn't exist. #remove_file(out_file) run_command ( exe_file ) #if not os.access(out_file, os.F_OK): #    sipconfig.error("%s failed to create %s. Make sure your Qt v4 installation is correct." % (exe_file, out_file)) # Read the directories. f = open ( out_file , "r" ) lines = f . read ( ) . strip ( ) . split ( "\n" ) f . close ( ) global qt_dir , qt_incdir , qt_libdir , qt_bindir , qt_datadir , qt_pluginsdir global qt_version , qt_edition , qt_licensee , qt_shared , qt_xfeatures qt_dir = lines [ 0 ] qt_incdir = lines [ 1 ] qt_libdir = lines [ 2 ] qt_bindir = lines [ 3 ] qt_datadir = lines [ 4 ] qt_pluginsdir = lines [ 5 ] qt_version = lines [ 6 ] qt_edition = lines [ 7 ] qt_licensee = lines [ 8 ] qt_shared = lines [ 9 ] qt_xfeatures = lines [ 10 : ] if opts . assume_shared : qt_shared = "shared" # 'Nokia' is the value that is used by Maemo's version of Qt. if qt_licensee in ( 'Open Source' , 'Nokia' ) : qt_licensee = None try : qt_version = int ( qt_version ) except ValueError : sipconfig . error ( "QT_VERSION should be a number but \"%s\" was found." % qt_version ) try : qt_edition = int ( qt_edition ) except ValueError : sipconfig . error ( "QT_EDITION should be a number but \"%s\" was found." % qt_edition ) # Now convert the edition to a descriptive string.  The order of testing is # important. if qt_edition & 0x200 : # It has ActiveQt. qt_edition = "Desktop" # ActiveQt became part of the open source version in v4.5.2. if qt_version >= 0x040502 and qt_licensee is None : qt_edition = "free" elif qt_edition & 0x008 : # It has OpenGL. qt_edition = "free" elif qt_edition & 0x002 : # It has GUI. qt_edition = "Desktop Light" else : qt_edition = "Console" if qt_shared : if opts . staticplugins : sipconfig . inform ( "Static plugins are disabled because Qt has been built as shared libraries." ) opts . staticplugins = [ ] else : if opts . static or opts . bigqt : pass else : sipconfig . error ( "Qt has been built as static libraries so either the -g or -k argument should be used." )