pyside2 missing deps
ZeroChaos- opened this issue · 4 comments
I like to have anything which a package directly links to in [R]DEPEND. Assuming you agree, the following are missing:
- /usr/lib/python3.7/site-packages/PySide2/QtSvg.cpython-37m-x86_64-linux-gnu.so links to /usr/lib64/libQt5Core.so.5
- Missing RDEPEND on dev-qt/qtcore
- Missing DEPEND on dev-qt/qtcore
- /usr/lib/python3.7/site-packages/PySide2/QtOpenGL.cpython-37m-x86_64-linux-gnu.so links to /usr/lib64/libQt5OpenGL.so.5
- Missing RDEPEND on dev-qt/qtopengl
- Missing DEPEND on dev-qt/qtopengl
I like to have anything which a package directly links to in [R]DEPEND. Assuming you agree...
I'd be an awful overlay maintainer if I didn't! So... yes. Well, maybe. There's no need to directly specify transitive dependencies already specified by direct dependencies, right? For example, in this case:
/usr/lib/python3.7/site-packages/PySide2/QtSvg.cpython-37m-x86_64-linux-gnu.so links to /usr/lib64/libQt5Core.so.5
Missing RDEPEND on dev-qt/qtcore
Missing DEPEND on dev-qt/qtcore
Right. So, dev-python/pyside2
already RDEPENDs on dev-python/shiboken2
, which RDEPENDS on dev-qt/qtcore
. Calculating Qt dependencies is non-trivial here, so it's probably best to leave this as is rather than duplicating that dependency. Also, DRY.
/usr/lib/python3.7/site-packages/PySide2/QtOpenGL.cpython-37m-x86_64-linux-gnu.so links to /usr/lib64/libQt5OpenGL.so.5
Missing RDEPEND on dev-qt/qtopengl
Missing DEPEND on dev-qt/qtopengl
Right. So, I assume /usr/lib64/libQt5OpenGL.so.5
is being pulled in due to your conditionally enabling the multimedia
and widgets
USE flags on dev-python/pyside2
. Again, everything is working as expected here; dev-python/pyside2
already RDEPENDs on dev-qt/qtmultimedia
when enabling the multimedia
USE flag, which RDEPENDS on dev-qt/qtopengl
when enabling the widgets
USE flag, which we transparently propagate to dev-qt/qtmultimedia
.
Since neither of these cases appears to be in error, I'm closing this for sanity. That said, feel free to reopen this if there actually is a substantive issue here I've missed. Thanks again, @ZeroChaos-! 👍
the substantive issue here is that relying on transitive deps can lead to transitive results. this is a direct link, meaning that if the deps of another package (shiboken2 or qtmultimedia for example) ever change, this ebuild would fail due to that change. personally I directly DEPEND on anything that has a direct link. You certainly don't have to, but it makes a lot more sense to me to simply DEPEND on what is known to be required for linking.
...meaning that if the deps of another package (shiboken2 or qtmultimedia for example) ever change...
These are fair points, but shiboken2
will always RDEPEND on qtcore
– even after we split that ebuild into two shiboken2-generator
and shiboken2-lib
ebuilds to conform with pip
packaging. That's definitely not in question.
That said... there's no harm in copying this RDEPEND directly into the pyside2
ebuild. Since you feel strongly about this and since you might be doing us all a tremendous favour by promoting these ebuilds into the Portage tree, the least I can do is add in this harmless redundant dependency. It shall be done.
As for qtmultimedia
, I examined the issue a bit closer. Something ugly appears to be happening. A recent version of PySide2 (5.14.0, probably) slipped in an unconditional dependency on QtOpenGL
without anyone's knowledge – I think, anyway. Maybe? The PySide2 build system is non-trivial, ...understatement alert! so I need to investigate this deeper. A cursory read of pyside-setup-opensource-src-5.14.2/sources/pyside2/PySide2/QtOpenGL/CMakeLists.txt
suggests we'll need to explicitly disable CMAKE_DISABLE_FIND_PACKAGE_Qt5OpenGL
under certain USE flag configurations that are yet to be determined – I think, anyway. Maybe? Let's grep around some more.
A Gentoo packager's work is truly never done. I'm reopening until the latter issue is solved. Thanks for hounding me on this. Volunteer teamwork to the ebuild rescue!
Boom. The prior two commits (i.e., a6801ab and 9b6b993) effectively resolve this and a host of other related OpenGL and Vulkan issues by:
- Adding
dev-qt/qtcore
as an unconditional RDEPEND todev-python/pyside2
. - Unconditionally disabling the deprecated
PySide2.QtOpenGL
submodule, thus preventingdev-python/pyside2
from implicitly RDEPENDing on the deprecateddev-qt/qtopengl
package. - Properly supporting the existing
gles2-only
USE flag. Namely:- Disabling this flag now explicitly disables GLES2 support in both the
PySide2.QtGui
andPySide2.OpenGLFuncctions
submodules. - This flag is now propagated to all Qt dependencies.
- Disabling this flag now explicitly disables GLES2 support in both the
- Adding a new
vulkan
USE flag, propagating Vulkan support to both shiboken2 and Qt dependencies.
Thanks again, @ZeroChaos-. Your justifiable insistence made us all better people.