https://bugs.kde.org/show_bug.cgi?id=439092

nyanpasu64 <nyanpas...@tuta.io> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nyanpas...@tuta.io

--- Comment #1 from nyanpasu64 <nyanpas...@tuta.io> ---
The code in question is at
https://invent.kde.org/frameworks/extra-cmake-modules/-/blob/3a75f891f5a914280a2a23194d1a61b19387d8ae/find-modules/FindPythonModuleGeneration.cmake#L258.

`foreach (pyversion "2" "3")` searches for a working Python, checking Python 2
first, then 3. It does so using:

  execute_process(
    COMMAND ${GPB_PYTHON_COMMAND} ${CMAKE_CURRENT_LIST_DIR}/sip_generator.py
--self-check ${libclang_LIBRARY}
    RESULT_VARIABLE selfCheckErrors
    ERROR_QUIET
  )

The problem is that this command completes successfully on Python 2 (either
that, or CMake thinks it does), so GPB_PYTHON_COMMAND is set to
GPB_PYTHON2_COMMAND. But calling GPB_PYTHON2_COMMAND run-sip.py fails later on.

One solution is to change sip_generator.py to run `from PyQt5.Qt import
PYQT_CONFIGURATION` like run-sip.py does, to test for errors more thoroughly. I
think it's also a good idea to test Python 3 before Python 2, or possibly
remove Python 2 entirely.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to