From afae01ffd370a829cb4c628a4dd7e8f87e35b2e3 Mon Sep 17 00:00:00 2001 From: "Liguros - Gitlab CI/CD [develop]" Date: Thu, 16 Apr 2026 19:13:42 +0000 Subject: Adding metadata --- dev-python/channels/Manifest | 6 +- dev-python/channels/channels-3.0.5.ebuild | 41 ----- dev-python/channels/channels-4.2.2.ebuild | 34 ---- dev-python/channels/channels-4.3.2.ebuild | 62 +++++++ .../files/channels-4.3.2-fix-install.patch | 14 ++ dev-python/channels/metadata.xml | 11 +- dev-python/langdetect/Manifest | 2 - .../files/langdetect-1.0.9-explicit-config.patch | 13 ++ dev-python/langdetect/langdetect-1.0.9.ebuild | 4 +- dev-python/langdetect/metadata.xml | 10 +- dev-python/qtpy/qtpy-2.4.3-r1.ebuild | 190 --------------------- dev-python/qtpy/qtpy-2.4.3-r2.ebuild | 185 ++++++++++++++++++++ 12 files changed, 287 insertions(+), 285 deletions(-) delete mode 100644 dev-python/channels/channels-3.0.5.ebuild delete mode 100644 dev-python/channels/channels-4.2.2.ebuild create mode 100644 dev-python/channels/channels-4.3.2.ebuild create mode 100644 dev-python/channels/files/channels-4.3.2-fix-install.patch create mode 100644 dev-python/langdetect/files/langdetect-1.0.9-explicit-config.patch delete mode 100644 dev-python/qtpy/qtpy-2.4.3-r1.ebuild create mode 100644 dev-python/qtpy/qtpy-2.4.3-r2.ebuild (limited to 'dev-python') diff --git a/dev-python/channels/Manifest b/dev-python/channels/Manifest index b58c0c2009cc..93bbf2713782 100644 --- a/dev-python/channels/Manifest +++ b/dev-python/channels/Manifest @@ -1,5 +1 @@ -DIST channels-3.0.5.gh.tar.gz 200118 BLAKE2B 7a7653f986face1e87369917317db013e5c9fc912c6e2d7c737054ffef167bd01feb48f7e2d00d0d331e7a16093478e5416645717aed59e46dfec8f9b3641a2e SHA512 b12d1aec9602b702b5a097e9ca52dccad49940f82fcbe5594890c9bd1f1879a2fcf0f29630ca53e4972a26853df8f71d07d7b2cccd876abbf2417a76dee281bf -DIST channels-4.2.2.gh.tar.gz 197010 BLAKE2B 321bf62c68038ce511145acd43c036dd298d58056f20ab2d676c3e3a8d6360a86a4f07c8f9ed6c123f888c012d69da22cfae4fb477dd5422cf326bf2de6a4c8f SHA512 8f7c8f27981988fed8ec254db91ce0a130b24842949ef94cc9ae21b4a259a7003654ec86c4e18aa81924e26d9b81b6a2aafaac404e490cbdda6b4a100476917a -EBUILD channels-3.0.5.ebuild 936 BLAKE2B 788d0e9a2822dd9d0ed2d1d1a62135aeb5f244710b66f7591962518a5204cde5b8e779280783dd1d1a1b1a3fa9b272a0eb457f1d88d62c8ecefc8f67384929ef SHA512 89003fa68c7ab1cdd1a329f4389ba6fe28f491217a70c03b2979a992b450d8aa1a02f024f073ad5fc0aa1d093d81c6c8b1adaa45bdc9a179f5bd1607d85c13ef -EBUILD channels-4.2.2.ebuild 829 BLAKE2B e5946c4a0eaf9fb3ffa2092a3d5d49d3d6ee16f151483fa2b716c8bab3350eca5e330a22822f881421d8882ffb970f4c56154c613477d094319e46addf1a5537 SHA512 84ce30d87a654c1a89ac299fb0f6447ca9c736e4b63497d83fc2687384e9cbe8094ba8f5021a19f726f9bae97c6b6d11eddef6a9ee5c275efe827bf95d3848ec -MISC metadata.xml 445 BLAKE2B b4c0a41d6caadfbc53cbba3c41f8b7689a286b3f8d285c37a88a1f79d8dc350b82fea255048c022b92091a1e0cc67bf19645d6c32183b82a6dd49cccadf5078f SHA512 380c8b98efe8d9a2513c51899b7de90b115d4a51f104f46b552ff8929c322850e511e245a2ba0e976213416ae7241a17292ca98248caacfc891fcdcf5cea5d44 +DIST channels-4.3.2.gh.tar.gz 206077 BLAKE2B c0913d67dc74bc728dd828584cf803b4ad175bab717de71ccf1e1c5b6aaca296fd15d011deb07b2876e63b7daaefab5e5ee24c323e907b3c563f5358759f14b8 SHA512 29d9c91aca721fad44143978863c45812bf596bb65cf99084803f78d85c664d5cc7ca1015df151cdc27754b822c9cfd18102989b6e5f59bc50257f6c9d8b8b3e diff --git a/dev-python/channels/channels-3.0.5.ebuild b/dev-python/channels/channels-3.0.5.ebuild deleted file mode 100644 index 03a4923889fe..000000000000 --- a/dev-python/channels/channels-3.0.5.ebuild +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -DISTUTILS_USE_PEP517=setuptools -PYTHON_COMPAT=( python3_{10..14} ) - -inherit distutils-r1 - -DESCRIPTION="Extends Django abilities beyond HTTP protocol" -HOMEPAGE="https://github.com/django/channels" -SRC_URI="https://github.com/django/${PN}/archive/${PV}.tar.gz -> ${P}.gh.tar.gz" - -LICENSE="BSD" -SLOT="0" -KEYWORDS="~amd64" - -DEPEND=" - >=dev-python/django-2.2[${PYTHON_USEDEP}] -" -BDEPEND=" - test? ( - dev-python/async-timeout[${PYTHON_USEDEP}] - >=dev-python/daphne-3.0[${PYTHON_USEDEP}] - > setup.cfg - - distutils-r1_python_prepare_all -} diff --git a/dev-python/channels/channels-4.2.2.ebuild b/dev-python/channels/channels-4.2.2.ebuild deleted file mode 100644 index 710613a7cbd1..000000000000 --- a/dev-python/channels/channels-4.2.2.ebuild +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -DISTUTILS_USE_PEP517=setuptools -PYTHON_COMPAT=( python3_{10..14} ) - -inherit distutils-r1 - -DESCRIPTION="Extends Django abilities beyond HTTP protocol" -HOMEPAGE="https://github.com/django/channels" -SRC_URI="https://github.com/django/${PN}/archive/${PV}.tar.gz -> ${P}.gh.tar.gz" - -LICENSE="BSD" -SLOT="0" -KEYWORDS="~amd64" - -DEPEND=" - >=dev-python/asgiref-3.5.0[${PYTHON_USEDEP}] - >=dev-python/django-4.2[${PYTHON_USEDEP}] -" -BDEPEND=" - test? ( - dev-python/async-timeout[${PYTHON_USEDEP}] - >=dev-python/daphne-4.0.0[${PYTHON_USEDEP}] - dev-python/pytest-asyncio[${PYTHON_USEDEP}] - dev-python/pytest-django[${PYTHON_USEDEP}] - ) -" - -distutils_enable_tests pytest -distutils_enable_sphinx docs \ - dev-python/sphinx-rtd-theme diff --git a/dev-python/channels/channels-4.3.2.ebuild b/dev-python/channels/channels-4.3.2.ebuild new file mode 100644 index 000000000000..ffafd1ece52b --- /dev/null +++ b/dev-python/channels/channels-4.3.2.ebuild @@ -0,0 +1,62 @@ +# Copyright 2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{10..14} ) + +inherit distutils-r1 #pypi + +DESCRIPTION="Brings async, event-driven capabilities to Django" +HOMEPAGE=" + https://channels.readthedocs.io/ + https://github.com/django/channels/ + https://pypi.org/project/channels/ +" +# no tests in sdist +SRC_URI=" + https://github.com/django/channels/archive/refs/tags/${PV}.tar.gz + -> ${P}.gh.tar.gz +" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64" + +RDEPEND=" + =dev-python/asgiref-3.9.0[${PYTHON_USEDEP}] + >=dev-python/django-4.2[${PYTHON_USEDEP}] +" +BDEPEND=" + test? ( + dev-python/async-timeout[${PYTHON_USEDEP}] + dev-python/selenium[${PYTHON_USEDEP}] + ) +" + +EPYTEST_IGNORE=( + # avoid daphne as it requires autobahn + tests/sample_project/tests/test_selenium.py + tests/security/test_websocket.py + tests/test_database.py + tests/test_generic_http.py + tests/test_generic_websocket.py + tests/test_http.py + tests/test_testing.py +) + +EPYTEST_PLUGINS=( pytest-django pytest-asyncio ) +distutils_enable_tests pytest + +PATCHES=( + "${FILESDIR}"/channels-4.3.2-fix-install.patch +) + +python_prepare_all() { + # avoid daphne as it requires autobahn + sed -e '/"daphne"/d' -i tests/sample_project/config/settings.py || die + + distutils-r1_python_prepare_all +} diff --git a/dev-python/channels/files/channels-4.3.2-fix-install.patch b/dev-python/channels/files/channels-4.3.2-fix-install.patch new file mode 100644 index 000000000000..18eca8f75445 --- /dev/null +++ b/dev-python/channels/files/channels-4.3.2-fix-install.patch @@ -0,0 +1,14 @@ +diff --git a/setup.cfg b/setup.cfg +index 742e1f6..43d8c0d 100644 +--- a/setup.cfg ++++ b/setup.cfg +@@ -52,7 +52,7 @@ types = + + [options.packages.find] + exclude = +- tests ++ tests* + + [flake8] + exclude = venv/*,tox/*,docs/*,testproject/*,build/* + diff --git a/dev-python/channels/metadata.xml b/dev-python/channels/metadata.xml index 7093cae71294..0dec5a678a5f 100644 --- a/dev-python/channels/metadata.xml +++ b/dev-python/channels/metadata.xml @@ -2,11 +2,10 @@ - marcin.deranek@slonko.net - Marcin Deranek + negril.nx+gentoo@gmail.com + Paul Zander - - https://github.com/django/channels/issues - - slonko-overlay + + gentoo-guru-overlay + \ No newline at end of file diff --git a/dev-python/langdetect/Manifest b/dev-python/langdetect/Manifest index d12ab8aeaca8..a11d7c268c91 100644 --- a/dev-python/langdetect/Manifest +++ b/dev-python/langdetect/Manifest @@ -1,3 +1 @@ DIST langdetect-1.0.9.tar.gz 981474 BLAKE2B ea8a9c3f16a2987c080742473bff4f2c1503f53fb3c2b40b0b1d6212bb6133ea22dce7864ffcfb8968c3a46b157d45cb3e2cf6f84bdbed0266cc716a853b032c SHA512 7558d674c47b080c79e43a00a25d2c7f77188cf60bea2cecb3bebb803d75e1aa42b43c74bd26ea1b541f4cb927421908882cbec01a91f0913984217e71ccc8db -EBUILD langdetect-1.0.9.ebuild 494 BLAKE2B 9cd8a2a93a8d45bf51fe2324402b175d641762ea591fcb99459427f977a95eccffa6ca4777ca4df39814eea6eac62711567faa654456d32f79023a4685804504 SHA512 d973b85ba1a44389a4275f02a779a93a005f7c2e096467b94b072862e4984d5b42cf33f9821ac68aa5b85b12c98983a90b96049989d8c84497969174b6bb838e -MISC metadata.xml 457 BLAKE2B 630128a3e982b6d60cc7b9f74c79fcb5ee47a71a02c73a50af9da8cedb6fad8e20a7f74b881e5b25c6483b92c9edbd56552cd38b2d9cbfa8b3eb4530facea969 SHA512 674f4f5cd809c6c77bc14e0f5687fa972bef14bdfa0b3343c5d66b7163eef1906eb87d060c8288732f825de71dce291ad0b841a5f2f0dd230f957b5687e45d45 diff --git a/dev-python/langdetect/files/langdetect-1.0.9-explicit-config.patch b/dev-python/langdetect/files/langdetect-1.0.9-explicit-config.patch new file mode 100644 index 000000000000..637368d2f237 --- /dev/null +++ b/dev-python/langdetect/files/langdetect-1.0.9-explicit-config.patch @@ -0,0 +1,13 @@ +Fix "Package 'langdetect.profiles' is absent from the `packages` configuration." + +--- a/setup.py ++++ b/setup.py +@@ -18,7 +18,7 @@ setup( + author_email='michal.danilak@gmail.com', + url='https://github.com/Mimino666/langdetect', + keywords='language detection library', +- packages=['langdetect', 'langdetect.utils', 'langdetect.tests'], ++ packages=['langdetect', 'langdetect.utils', 'langdetect.tests', 'langdetect.profiles'], + include_package_data=True, + install_requires=['six'], + license='MIT', diff --git a/dev-python/langdetect/langdetect-1.0.9.ebuild b/dev-python/langdetect/langdetect-1.0.9.ebuild index 271137de443d..7100f5f39dd8 100644 --- a/dev-python/langdetect/langdetect-1.0.9.ebuild +++ b/dev-python/langdetect/langdetect-1.0.9.ebuild @@ -1,4 +1,4 @@ -# Copyright 2022 Gentoo Authors +# Copyright 2022-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -19,4 +19,6 @@ KEYWORDS="~amd64" RDEPEND="dev-python/six[${PYTHON_USEDEP}]" +PATCHES=( "${FILESDIR}/${P}-explicit-config.patch" ) + distutils_enable_tests unittest diff --git a/dev-python/langdetect/metadata.xml b/dev-python/langdetect/metadata.xml index 020e07f2a3dd..c0f74ac187e2 100644 --- a/dev-python/langdetect/metadata.xml +++ b/dev-python/langdetect/metadata.xml @@ -2,11 +2,9 @@ - marcin.deranek@slonko.net - Marcin Deranek + pastalian46@gmail.com + Takuya Wakazono - - https://github.com/Mimino666/langdetect/issues - - slonko-overlay + + gentoo-guru-overlay \ No newline at end of file diff --git a/dev-python/qtpy/qtpy-2.4.3-r1.ebuild b/dev-python/qtpy/qtpy-2.4.3-r1.ebuild deleted file mode 100644 index 1d170251792e..000000000000 --- a/dev-python/qtpy/qtpy-2.4.3-r1.ebuild +++ /dev/null @@ -1,190 +0,0 @@ -# Copyright 1999-2025 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -DISTUTILS_USE_PEP517=setuptools -PYPI_PN=QtPy -PYTHON_COMPAT=( python3_{10..14} ) - -inherit distutils-r1 virtualx pypi - -DESCRIPTION="Abstraction layer on top of PyQt and PySide with additional custom QWidgets" -HOMEPAGE=" - https://github.com/spyder-ide/qtpy/ - https://pypi.org/project/QtPy/ -" - -LICENSE="MIT" -SLOT="0" -KEYWORDS="amd64 ~arm arm64 ~loong ~ppc64 ~riscv x86" - -_IUSE_QT_MODULES=" - bluetooth dbus designer +gui help multimedia +network nfc opengl pdfium - positioning printsupport qml quick quick3d remoteobjects scxml sensors - serialport spatialaudio speech +sql svg testlib vulkan webchannel - webengine websockets +widgets +xml -" -IUSE="+pyqt6 pyside6 ${_IUSE_QT_MODULES}" -unset _IUSE_QT_MODULES - -REQUIRED_USE=" - || ( pyqt6 pyside6 ) - pyside6? ( || ( $(python_gen_useflags python3_{11..13}) ) ) -" - -# These flags are currently *not* common to the PySide2/6 and PyQt5/6 ebuilds -# Disable them for now, please check periodically if this is still up to date. -# 3d? ( pyside6 only ) -# charts? ( pyside6 only ) -# concurrent? ( pyside6 only ) -# httpserver? ( pyside6 only ) -# uitools? ( pyside6 only ) -# location? ( pyside6 only) -# network-auth? ( pyside6 only ) - -# WARNING: the obvious solution of using || for PyQt5/pyside2 is not going -# to work. The package only checks whether PyQt5/pyside2 is installed, it does -# not verify whether they have the necessary modules (i.e. satisfy the USE dep). -# -# Webengine is a special case, because PyQt6 provides this in a separate package -# while PySide6 ships it in the same package. -RDEPEND=" - dev-python/packaging[${PYTHON_USEDEP}] - pyqt6? ( - dev-python/pyqt6[${PYTHON_USEDEP}] - dev-python/pyqt6[bluetooth?,dbus?,designer?,gui?,help?,multimedia?] - dev-python/pyqt6[network?,nfc?,opengl?,pdfium?,positioning?] - dev-python/pyqt6[printsupport?,qml?,quick?,quick3d?,remoteobjects?] - dev-python/pyqt6[scxml(-)?,sensors?,serialport?,spatialaudio?,speech?] - dev-python/pyqt6[sql?,svg?,testlib?,vulkan?,webchannel?,websockets?] - dev-python/pyqt6[widgets?,xml?] - webengine? ( dev-python/pyqt6-webengine[${PYTHON_USEDEP},widgets?,quick?] ) - - ) - pyside6? ( - $(python_gen_cond_dep ' - dev-python/pyside:6[${PYTHON_USEDEP},core(+)] - dev-python/pyside:6[bluetooth?,dbus?,designer?,gui?,help?,multimedia?] - dev-python/pyside:6[network?,nfc?,opengl?,pdfium?,positioning?] - dev-python/pyside:6[printsupport?,qml?,quick?,quick3d?,remoteobjects(-)?] - dev-python/pyside:6[scxml?,sensors?,serialport?,spatialaudio?,speech?] - dev-python/pyside:6[sql?,svg?,testlib?,vulkan(+)?,webchannel?,webengine?] - dev-python/pyside:6[websockets?,widgets?,xml?] - ' python3_{11..13}) - ) -" - -# The QtPy testsuite skips tests for bindings that are not installed, so here we -# ensure that everything is available and all tests are run. Note that not -# all flags are available in PyQt5/PySide2, so some tests are still skipped. -BDEPEND=" - test? ( - pyqt6? ( - dev-python/pyqt6[${PYTHON_USEDEP}] - dev-python/pyqt6[bluetooth,dbus,designer,gui,help,multimedia] - dev-python/pyqt6[network,nfc,opengl,pdfium,positioning,printsupport] - dev-python/pyqt6[qml,quick,quick3d,scxml(-),sensors,serialport] - dev-python/pyqt6[spatialaudio,speech,sql,svg,testlib,webchannel] - dev-python/pyqt6[vulkan(-),websockets,widgets,xml] - dev-python/pyqt6-webengine[${PYTHON_USEDEP},widgets,quick] - dev-qt/qtbase:6[sqlite] - ) - pyside6? ( - $(python_gen_cond_dep ' - dev-python/pyside:6[${PYTHON_USEDEP},core(+)] - dev-python/pyside:6[3d,bluetooth,charts,concurrent,dbus,designer,gui] - dev-python/pyside:6[help,location,multimedia,network,network-auth] - dev-python/pyside:6[nfc,opengl,pdfium,positioning,printsupport,qml] - dev-python/pyside:6[quick,quick3d,scxml,sensors,serialport] - dev-python/pyside:6[spatialaudio,speech,sql,svg,testlib,vulkan(+)] - dev-python/pyside:6[webchannel,webengine,websockets,widgets,xml] - dev-qt/qtbase:6[sqlite] - ' python3_{11..13}) - ) - ) -" - -EPYTEST_PLUGINS=( pytest-qt ) -distutils_enable_tests pytest - -src_prepare() { - distutils-r1_src_prepare - # Disable Qt for Python implementations that are not selected - - # Always disable PyQt5 - sed \ - -e '/from PyQt5.QtCore import/,/)/c\ \ \ \ \ \ \ \ raise ImportError #/' \ - -e '/if "PyQt5" in sys.modules:/,/"pyqt5"/c\' \ - -i qtpy/__init__.py || die - - # We need to ensure the first option is an 'if' not 'elif' - sed -e 's/elif "PySide2" in sys.modules:/if "PySide2" in sys.modules:/g' \ - -i qtpy/__init__.py || die - - # Always disable PySide2 - sed \ - -e "s/from PySide2 import/raise ImportError #/" \ - -e "s/from PySide2.QtCore import/raise ImportError #/" \ - -e '/if "PySide2" in sys.modules:/,/"pyside2"/c\' \ - -i qtpy/__init__.py || die - - sed \ - -e 's/elif "PyQt6" in sys.modules:/if "PyQt6" in sys.modules:/g' \ - -i qtpy/__init__.py || die - - if ! use pyqt6; then - sed \ - -e '/from PyQt6.QtCore import/,/)/c\ \ \ \ \ \ \ \ raise ImportError #/' \ - -e '/if "PyQt6" in sys.modules:/,/"pyqt6"/c\' \ - -i qtpy/__init__.py || die - - sed \ - -e 's/elif "PySide6" in sys.modules:/if "PySide6" in sys.modules:/g' \ - -i qtpy/__init__.py || die - fi - if ! use pyside6; then - sed \ - -e "s/from PySide6 import/raise ImportError #/" \ - -e "s/from PySide6.QtCore import/raise ImportError #/" \ - -e '/if "PySide6" in sys.modules:/,/"pyside6"/c\' \ - -i qtpy/__init__.py || die - fi -} - -python_test() { - local -x QT_API - local -a EPYTEST_DESELECT - local other - - # Test for each enabled Qt4Python target. - # Deselect the other targets, their test fails if we specify QT_API - # or if we have disabled their corresponding inherit in __init__.py above - for QT_API in PyQt6 PySide6; do - if use "${QT_API,,}"; then - EPYTEST_DESELECT=() - for other in PyQt{5,6} PySide{2,6}; do - if [[ ${QT_API} != ${other} ]]; then - EPYTEST_DESELECT+=( - "qtpy/tests/test_main.py::test_qt_api_environ[${other}]" - ) - fi - done - - einfo "Testing with ${EPYTHON} and QT_API=${QT_API}" - nonfatal epytest -o addopts= || - die -n "Tests failed with ${EPYTHON} and QT_API=${QT_API}" || - return 1 - fi - done -} - -src_test() { - virtx distutils-r1_src_test -} - -pkg_postinst() { - elog "When multiple Qt4Python targets are enabled QtPy will default to" - elog "the first enabled target in this order: PyQt6 PySide6." - elog "This can be overridden with the QT_API environment variable." -} diff --git a/dev-python/qtpy/qtpy-2.4.3-r2.ebuild b/dev-python/qtpy/qtpy-2.4.3-r2.ebuild new file mode 100644 index 000000000000..eeb886cd06b0 --- /dev/null +++ b/dev-python/qtpy/qtpy-2.4.3-r2.ebuild @@ -0,0 +1,185 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYPI_PN=QtPy +PYTHON_COMPAT=( python3_{10..14} ) + +inherit distutils-r1 virtualx pypi + +DESCRIPTION="Abstraction layer on top of PyQt and PySide with additional custom QWidgets" +HOMEPAGE=" + https://github.com/spyder-ide/qtpy/ + https://pypi.org/project/QtPy/ +" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="amd64 ~arm arm64 ~loong ~ppc64 ~riscv x86" + +_IUSE_QT_MODULES=" + bluetooth dbus designer +gui help multimedia +network nfc opengl pdfium + positioning printsupport qml quick quick3d remoteobjects scxml sensors + serialport spatialaudio speech +sql svg testlib vulkan webchannel + webengine websockets +widgets +xml +" +IUSE="+pyqt6 pyside6 ${_IUSE_QT_MODULES}" +unset _IUSE_QT_MODULES + +REQUIRED_USE=" + || ( pyqt6 pyside6 ) +" + +# These flags are currently *not* common to the PySide2/6 and PyQt5/6 ebuilds +# Disable them for now, please check periodically if this is still up to date. +# 3d? ( pyside6 only ) +# charts? ( pyside6 only ) +# concurrent? ( pyside6 only ) +# httpserver? ( pyside6 only ) +# uitools? ( pyside6 only ) +# location? ( pyside6 only) +# network-auth? ( pyside6 only ) + +# WARNING: the obvious solution of using || for PyQt5/pyside2 is not going +# to work. The package only checks whether PyQt5/pyside2 is installed, it does +# not verify whether they have the necessary modules (i.e. satisfy the USE dep). +# +# Webengine is a special case, because PyQt6 provides this in a separate package +# while PySide6 ships it in the same package. +RDEPEND=" + dev-python/packaging[${PYTHON_USEDEP}] + pyqt6? ( + dev-python/pyqt6[${PYTHON_USEDEP}] + dev-python/pyqt6[bluetooth?,dbus?,designer?,gui?,help?,multimedia?] + dev-python/pyqt6[network?,nfc?,opengl?,pdfium?,positioning?] + dev-python/pyqt6[printsupport?,qml?,quick?,quick3d?,remoteobjects?] + dev-python/pyqt6[scxml(-)?,sensors?,serialport?,spatialaudio?,speech?] + dev-python/pyqt6[sql?,svg?,testlib?,vulkan?,webchannel?,websockets?] + dev-python/pyqt6[widgets?,xml?] + webengine? ( dev-python/pyqt6-webengine[${PYTHON_USEDEP},widgets?,quick?] ) + + ) + pyside6? ( + dev-python/pyside:6[${PYTHON_USEDEP},core(+)] + dev-python/pyside:6[bluetooth?,dbus?,designer?,gui?,help?,multimedia?] + dev-python/pyside:6[network?,nfc?,opengl?,pdfium?,positioning?] + dev-python/pyside:6[printsupport?,qml?,quick?,quick3d?,remoteobjects(-)?] + dev-python/pyside:6[scxml?,sensors?,serialport?,spatialaudio?,speech?] + dev-python/pyside:6[sql?,svg?,testlib?,vulkan(+)?,webchannel?,webengine?] + dev-python/pyside:6[websockets?,widgets?,xml?] + ) +" + +# The QtPy testsuite skips tests for bindings that are not installed, so here we +# ensure that everything is available and all tests are run. Note that not +# all flags are available in PyQt5/PySide2, so some tests are still skipped. +BDEPEND=" + test? ( + pyqt6? ( + dev-python/pyqt6[${PYTHON_USEDEP}] + dev-python/pyqt6[bluetooth,dbus,designer,gui,help,multimedia] + dev-python/pyqt6[network,nfc,opengl,pdfium,positioning,printsupport] + dev-python/pyqt6[qml,quick,quick3d,scxml(-),sensors,serialport] + dev-python/pyqt6[spatialaudio,speech,sql,svg,testlib,webchannel] + dev-python/pyqt6[vulkan(-),websockets,widgets,xml] + dev-python/pyqt6-webengine[${PYTHON_USEDEP},widgets,quick] + dev-qt/qtbase:6[sqlite] + ) + pyside6? ( + dev-python/pyside:6[${PYTHON_USEDEP},core(+)] + dev-python/pyside:6[3d,bluetooth,charts,concurrent,dbus,designer,gui] + dev-python/pyside:6[help,location,multimedia,network,network-auth] + dev-python/pyside:6[nfc,opengl,pdfium,positioning,printsupport,qml] + dev-python/pyside:6[quick,quick3d,scxml,sensors,serialport] + dev-python/pyside:6[spatialaudio,speech,sql,svg,testlib,vulkan(+)] + dev-python/pyside:6[webchannel,webengine,websockets,widgets,xml] + dev-qt/qtbase:6[sqlite] + ) + ) +" + +EPYTEST_PLUGINS=( pytest-qt ) +distutils_enable_tests pytest + +src_prepare() { + distutils-r1_src_prepare + # Disable Qt for Python implementations that are not selected + + # Always disable PyQt5 + sed \ + -e '/from PyQt5.QtCore import/,/)/c\ \ \ \ \ \ \ \ raise ImportError #/' \ + -e '/if "PyQt5" in sys.modules:/,/"pyqt5"/c\' \ + -i qtpy/__init__.py || die + + # We need to ensure the first option is an 'if' not 'elif' + sed -e 's/elif "PySide2" in sys.modules:/if "PySide2" in sys.modules:/g' \ + -i qtpy/__init__.py || die + + # Always disable PySide2 + sed \ + -e "s/from PySide2 import/raise ImportError #/" \ + -e "s/from PySide2.QtCore import/raise ImportError #/" \ + -e '/if "PySide2" in sys.modules:/,/"pyside2"/c\' \ + -i qtpy/__init__.py || die + + sed \ + -e 's/elif "PyQt6" in sys.modules:/if "PyQt6" in sys.modules:/g' \ + -i qtpy/__init__.py || die + + if ! use pyqt6; then + sed \ + -e '/from PyQt6.QtCore import/,/)/c\ \ \ \ \ \ \ \ raise ImportError #/' \ + -e '/if "PyQt6" in sys.modules:/,/"pyqt6"/c\' \ + -i qtpy/__init__.py || die + + sed \ + -e 's/elif "PySide6" in sys.modules:/if "PySide6" in sys.modules:/g' \ + -i qtpy/__init__.py || die + fi + if ! use pyside6; then + sed \ + -e "s/from PySide6 import/raise ImportError #/" \ + -e "s/from PySide6.QtCore import/raise ImportError #/" \ + -e '/if "PySide6" in sys.modules:/,/"pyside6"/c\' \ + -i qtpy/__init__.py || die + fi +} + +python_test() { + local -x QT_API + local -a EPYTEST_DESELECT + local other + + # Test for each enabled Qt4Python target. + # Deselect the other targets, their test fails if we specify QT_API + # or if we have disabled their corresponding inherit in __init__.py above + for QT_API in PyQt6 PySide6; do + if use "${QT_API,,}"; then + EPYTEST_DESELECT=() + for other in PyQt{5,6} PySide{2,6}; do + if [[ ${QT_API} != ${other} ]]; then + EPYTEST_DESELECT+=( + "qtpy/tests/test_main.py::test_qt_api_environ[${other}]" + ) + fi + done + + einfo "Testing with ${EPYTHON} and QT_API=${QT_API}" + nonfatal epytest -o addopts= || + die -n "Tests failed with ${EPYTHON} and QT_API=${QT_API}" || + return 1 + fi + done +} + +src_test() { + virtx distutils-r1_src_test +} + +pkg_postinst() { + elog "When multiple Qt4Python targets are enabled QtPy will default to" + elog "the first enabled target in this order: PyQt6 PySide6." + elog "This can be overridden with the QT_API environment variable." +} -- cgit v1.3