Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-121491

Consolidate logic to detect python interpreter (qtdeclarative, qtwebengine)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 6.7.0
    • WebEngine
    • None

    Description

      Both qtwebengine and qtdeclarative need a Python interpreter at build time. Anyhow, both use separate logic, which leads to different interpreters being detected for me:

      Python3_EXECUTABLE:FILEPATH=C:/Users/kakoehne/AppData/Local/Microsoft/WindowsApps/python3.exe
      QT_INTERNAL_DECLARATIVE_PYTHON:STRING=C:/Python310/python.exe
      

      Note that python3.exe for me is only a link to launch the Windows app store, so Qt WebEngine does not compile by default.

      Easiest fix would be to use the same logic in qtdeclarative also for qtwebengine:

      qt_find_package(Python REQUIRED)
      if(Python_Interpreter_FOUND)
          # Need to make it globally available to the project
          set(QT_INTERNAL_DECLARATIVE_PYTHON "${Python_EXECUTABLE}" CACHE STRING "")
      endif()
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            mibrunin Michael Bruning
            kkohne Kai Köhne
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes