conda-forge / pyside2-feedstock

A conda-smithy repository for pyside2.
BSD 3-Clause "New" or "Revised" License
17 stars 21 forks source link

PySide6 clobbers qt-main binaries #223

Closed hmaarrfk closed 2 months ago

hmaarrfk commented 6 months ago

Comment:

xref: https://github.com/conda-forge/pyside2-feedstock/pull/222 sorry about this, I think the problem is that for some reason the uic file gets moved to bin and gets included.

./qt-main-5.15.8-h112747c_20/bin/uic
./pyside6-6.7.0-py310h7a3fa89_1/bin/uic
./qt6-main-6.7.0-h87a10bb_0/lib/qt6/ui

so clearly qt6-main uses it well, but the pyside6 exe moves it somehow???

hmaarrfk commented 6 months ago

The problem seems to stem from:

https://github.com/pyside/pyside-setup/blob/dev/sources/pyside-tools/CMakeLists.txt#L34C12-L34C23

and further problems also seem to arise from their direct copying of python files to the bin directory: https://github.com/pyside/pyside-setup/blob/dev/sources/pyside-tools/CMakeLists.txt#L66

traversaro commented 3 months ago

Since matplotlib down depends on pyside6 (see https://github.com/conda-forge/matplotlib-feedstock/pull/393) I would expect this to start to impact users that install both matplotlib and qt-main, and in CMake use Qt5. Unfortunately this means that qt5_wrap_ui starts to silently use qt6's uic instead of qt5's uic, leading to error such as:

2024-08-05T02:37:16.8327029Z /home/runner/work/robotology-superbuild/robotology-superbuild/b/src/YARP/src/yarpmanager/ui_mainwindow.h:13:10: fatal error: QtGui/QAction: No such file or directory

from which it is not obvious to understand what is the issue.

traversaro commented 3 months ago

As related note, I am not sure why, but I do not get any clobber warning when installing qt-main and pyside6 in the same environment.

hmaarrfk commented 3 months ago

Would there be a way to patch the CMake files to be more specific about the binaries? Adding specificity is the only way I have to get out of the conundrum

traversaro commented 3 months ago

I tried a trick from mingw ( https://github.com/msys2/MINGW-packages/blob/a210e17b1c072aba72add0d3b61ee1b811698716/mingw-w64-pyside6/PKGBUILD#L91 ), let's see if it works.

jschueller commented 2 months ago

looks NO_QTTOOL=yes is in and we have /bin/uic no more