In the ebuild for dev-python/QtPy-1.1.2, we find || ( dev-python/PyQt5[${PYTHON_USEDEP},designer=,svg=,webkit=] dev-python/PyQt4[${PYTHON_USEDEP},designer=,svg=,webkit=] dev-python/pyside[${PYTHON_USEDEP},designer=,svg=,webkit=] ) Assume QtPy has the webkit use flag enabled, e.g., for spyder. When PyQt4 has webkit enabled, but PyQt5 does not (all else being equal), then this is fine by this ebuild. However, when then QtPy uses the PyQt5 backend, e.g., for spyder, then an exception is raised related to the missing webkit functionality. So the constraints need to be modified so that if a backend is installed, then it should satisfy the use flag constraint. I do not know how this should be done. What I can think of is the following inelegant hack: add a use flag for each of the backends and then, e.g., for the PyQt5 backend, do !pyqt5? ( !dev-python/PyQt5 ) pyqt5? ( dev-python/PyQt5[${PYTHON_USEDEP},designer=,svg=,webkit=] ) The first line makes sure that the use flag has actual meaning and the second enforces the use flags if PyQt5 is installed.
Still valid for current ebuild in portage.
Since QtPy is so automatic, I'm not sure if there's any good way we can handle it.
We may need to introduce USE flags for each of the supported backends and move each dependency behind that USE flag and patch qtpy/__init__.py to only support the enabled backends.
Created attachment 496262 [details] QtPy-1.3.1.ebuild Here's an ebuild for the latest version of QtPy with my suggested changes. Testing would be greatly appreciated.
(In reply to Michael Palimaka (kensington) from comment #4) > Here's an ebuild for the latest version of QtPy with my suggested changes. > Testing would be greatly appreciated. It installed without problems. I quickly tested Spyder, the application I use that uses QtPy, and it seems to work without a hitch. My use flags: opengl pyqt5 svg webkit -designer -gui -pyqt4 -pyside -testlib PYTHON_TARGETS="python2_7 python3_4 -python3_5 -python3_6"
Thanks for the feedback, it's definitely appreciated.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=649ce73ba08a5fd8af802937b3b44fab8e9a4a82 commit 649ce73ba08a5fd8af802937b3b44fab8e9a4a82 Author: Michael Palimaka <kensington@gentoo.org> AuthorDate: 2017-09-28 12:21:39 +0000 Commit: Michael Palimaka <kensington@gentoo.org> CommitDate: 2017-09-28 12:21:56 +0000 dev-python/QtPy: version bump 1.3.1 Closes: https://bugs.gentoo.org/602528 Closes: https://bugs.gentoo.org/611856 Package-Manager: Portage-2.3.8, Repoman-2.3.3 dev-python/QtPy/Manifest | 1 + dev-python/QtPy/QtPy-1.3.1.ebuild | 55 +++++++++++++++++++++++++++++++++++++++ dev-python/QtPy/metadata.xml | 3 +++ 3 files changed, 59 insertions(+)