Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-2091

The default value of FORCE_LIMITED_API does not match the documentation

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • None
    • 5.15.4, 6.2.4, 6.3.2, 6.4.0
    • Build System
    • None
    • All
    • 9adf480946 (pyside/pyside-setup/dev) 9adf480946 (pyside/tqtc-pyside-setup/dev) d15492992f (pyside/pyside-setup/6.4) d15492992f (pyside/tqtc-pyside-setup/6.4) 59efd8a241 (pyside/tqtc-pyside-setup/6.2) 9adf480946 (pyside/tqtc-pyside-setup/tqtc/dev)

    Description

      The limited API is documented to being enabled by default in various places:

      • "default yes if applicable"
      • "default yes if applicable, i.e. python version >= 3.7"
      • option(FORCE_LIMITED_API "Enable the limited API." "yes")

      However this default actually broke/changed in https://codereview.qt-project.org/c/pyside/pyside-setup/+/230935 and it appears that was not intentional given the commit message states "In the end nothing changes, limited API builds will still be default".

      The reason being that CMake options are strictly boolean values. CMake will convert the default "yes" to the standard boolean "ON". However code to read this does not expect boolean values and only compares based on literal strings:

      https://code.qt.io/cgit/pyside/pyside-setup.git/tree/sources/shiboken6/cmake/ShibokenHelpers.cmake#n259

      • if(FORCE_LIMITED_API STREQUAL "yes")

      Given FORCE_LIMITED_API is a boolean, this should simply read IF(FORCE_LIMITED_API).

      Attachments

        Activity

          People

            crmaurei Cristian Maureira-Fredes
            bo98 Bo Anderson
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: