summaryrefslogtreecommitdiff
path: root/dev-python/QtPy
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-05-22 07:31:18 +0100
committerV3n3RiX <venerix@redcorelinux.org>2021-05-22 07:31:18 +0100
commit908778078736bd36f7a60a2d576d415cb8e000fa (patch)
treec6a4796c48b608c14dc7e9674cdbd38f905e3c15 /dev-python/QtPy
parent185fa19bbf68a4d4dca534d2b46729207a177f16 (diff)
gentoo resync : 22.05.2021
Diffstat (limited to 'dev-python/QtPy')
-rw-r--r--dev-python/QtPy/Manifest6
-rw-r--r--dev-python/QtPy/QtPy-1.9.0-r2.ebuild25
-rw-r--r--dev-python/QtPy/QtPy-1.9.0-r3.ebuild107
-rw-r--r--dev-python/QtPy/QtPy-1.9.0-r4.ebuild140
-rw-r--r--dev-python/QtPy/metadata.xml12
5 files changed, 169 insertions, 121 deletions
diff --git a/dev-python/QtPy/Manifest b/dev-python/QtPy/Manifest
index 9b836307e16c..2dbd1edd9b11 100644
--- a/dev-python/QtPy/Manifest
+++ b/dev-python/QtPy/Manifest
@@ -1,4 +1,4 @@
DIST QtPy-1.9.0.tar.gz 35522 BLAKE2B 05b700c1f804cc535c3065c8f819d1d7fb0e02d43f199082d2e0d2c575ff8dbfdbf0053ddb3b155108cf55350ff4daf75166ab39a60374a35a86a1707724a4a1 SHA512 2492c531f0df3afc9e0f8875a2b2e39cc8b09542fb9f251900b8596c0db7767390bb85365cc39efd6cd37ae852a00655354e6f9f3d795023e4fd86dbf8bd5fa7
-EBUILD QtPy-1.9.0-r2.ebuild 956 BLAKE2B 3a5efbef2e6ec3f5c2c175940f9f4825d578c57a7fa701db6ea9e8ca0441fd3e460f258e585b1b96ef28a482dfa25c31d6c9d13dfccda5c381743fb3f34d244c SHA512 b190a298d525dd9d02a3f110ef62bc40369e5d23a5c58facab74140da08ab1651f0a74a7c9e183550dba049df051aa4e70da6f049a1a1533b30bb2f06e13a02f
-EBUILD QtPy-1.9.0-r3.ebuild 4249 BLAKE2B 8d9f5f2649006c32b94f06dba70da730cf134e9a0f6ba7c69c41c86878159b60f88a5fd5c8f4b70db92215a2285ca74cd4758c2efa6c22e2bce27bc60156704f SHA512 6e4e0940b2033d8f7ce61ed34977cb5519e035d6643a86d7dae43e684503a840f6e9055d8c3151c4574d4de142b679a6a71522ff7df2e1091fc9f848ab30cb59
-MISC metadata.xml 2880 BLAKE2B 450b5c73c1124218ba688cc9a010657d03fe32398150334884574404c1a5767223f7a9481ee42e545e032d7ad2dec8a0537b7bf3251e0e14a6696f1d0c73e0d1 SHA512 175e7a513706bf9c50f04b8795f19df660ef0e228a6d65e7c4c998c07ac181da204aedbc9905deb63d74a65742cc80d7935bcc0d694fa8bff5e386b79bb5ea26
+EBUILD QtPy-1.9.0-r2.ebuild 1843 BLAKE2B 59c654a4b01a6ac224f52dfbaf76b9e8fd4d700f86cf19e9e550fbbbe9d902eab2df7c635c14ba9ba4dca765f8f5eca2ca1b484795357df063484decb8c65f6b SHA512 c07139bee6407ca790c96e75eef4697e4e4463f32627438b8c4027274eefcf9dc7718ab03725184885d9ec020db966ce253a4733f7009e79947dff725643f04b
+EBUILD QtPy-1.9.0-r4.ebuild 4991 BLAKE2B 4ba264b82b412c0e6d8be3695beb0289cc459ce090cbe14dc8a512deba70bed9a740e9536ce92378c7bc3b82f3396cf1fdcd3b3518801d901ec616b064771e75 SHA512 9d6e0404eee155d8dc0f955a3f0a3db83bc550f67492c273241dfaf76ff6b055a926edbea8adfa5db20f9c8438d6f20a3317252f106ad0ca7fa3193d64fc4027
+MISC metadata.xml 2803 BLAKE2B 98036d01bac06a15e8b4cfec09151f687cc1c9579b29171bca1645dc18e1c4bc3ffb012899e2b3aad859332d39758232beb705e9949f9680157960d32828658d SHA512 0faeb7d93657eacaaf24b0575770cf409531e914b8355fc0d6dbba0d968905f78146ca0695d9a17651f4c9d2ae98d183c29c8eb9ee1ee7bdf9e100bd29d5fb9a
diff --git a/dev-python/QtPy/QtPy-1.9.0-r2.ebuild b/dev-python/QtPy/QtPy-1.9.0-r2.ebuild
index 32222ef6ef48..8e1f50a8e472 100644
--- a/dev-python/QtPy/QtPy-1.9.0-r2.ebuild
+++ b/dev-python/QtPy/QtPy-1.9.0-r2.ebuild
@@ -1,13 +1,13 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python3_{7..9} )
-inherit distutils-r1
+inherit distutils-r1 virtualx
-DESCRIPTION="Abstraction layer for PyQt5/PySide"
+DESCRIPTION="Abstraction layer on top of PyQt5 and PySide2 and additional custom QWidgets"
HOMEPAGE="https://github.com/spyder-ide/qtpy"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
@@ -16,11 +16,25 @@ SLOT="0"
KEYWORDS="amd64 arm64 x86"
IUSE="designer gui opengl printsupport svg testlib webengine"
+# 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).
RDEPEND="
dev-python/PyQt5[${PYTHON_USEDEP},designer?,opengl?,printsupport?,svg?]
gui? ( dev-python/PyQt5[${PYTHON_USEDEP},gui,widgets] )
testlib? ( dev-python/PyQt5[${PYTHON_USEDEP},testlib] )
webengine? ( dev-python/PyQtWebEngine[${PYTHON_USEDEP}] )"
+# The QtPy testsuite skips tests for bindings that are
+# not installed, so here we ensure that everything
+# is available and all tests are run.
+BDEPEND="
+ test? (
+ dev-python/mock[${PYTHON_USEDEP}]
+ dev-python/PyQt5[${PYTHON_USEDEP},bluetooth,dbus,declarative,designer,gui,help,location,multimedia,network,networkauth,opengl,positioning,printsupport,sensors,serialport,sql,ssl,svg,testlib,webchannel,webkit,websockets,widgets,x11extras,xml(+),xmlpatterns]
+ dev-python/PyQtWebEngine[${PYTHON_USEDEP}]
+ )"
+
+distutils_enable_tests pytest
src_prepare() {
default
@@ -29,3 +43,8 @@ src_prepare() {
sed -i -e "s/from PySide import/raise ImportError #/" qtpy/__init__.py || die
sed -i -e "s/from PySide2 import/raise ImportError #/" qtpy/__init__.py || die
}
+
+python_test() {
+ local -x QT_API="pyqt5"
+ virtx pytest -vv
+}
diff --git a/dev-python/QtPy/QtPy-1.9.0-r3.ebuild b/dev-python/QtPy/QtPy-1.9.0-r3.ebuild
deleted file mode 100644
index e707c30eebb6..000000000000
--- a/dev-python/QtPy/QtPy-1.9.0-r3.ebuild
+++ /dev/null
@@ -1,107 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{7..8} )
-
-inherit distutils-r1 virtualx
-
-DESCRIPTION="Abstraction layer on top of PyQt5 and PySide2 and additional custom QWidgets"
-HOMEPAGE="https://github.com/spyder-ide/qtpy"
-SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
-
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="~amd64 ~arm64 ~x86"
-
-IUSE="
- declarative designer gui help location multimedia network
- opengl positioning printsupport qml quick sensors serialport
- sql svg test testlib webchannel webengine websockets
- widgets x11extras xml xmlpatterns
-"
-
-# Webengine is a special case, because PyQt5 provides this in a
-# separate package , while PySide2 ships it in the same package
-#
-# declarative/qml/quick is a special case, because PyQt5 bundles
-# the bindings for qml and quick in one flag: declarative,
-# PySide2 does not.
-#
-# The PyQt5 ebuild currently enables xml support unconditionally,
-# the flag is added anyway with a (+) to make it future proof
-# if the ebuild were to change this behaviour in the future.
-#
-# The PySide2 ebuild currently enables opengl and serialport
-# support unconditionally, the flag is added anyway with a (+)
-# to make it future proof if the ebuild were to change this
-# behaviour in the future.
-#
-RDEPEND="
- app-eselect/eselect-QtPy
- || (
- dev-python/PyQt5[${PYTHON_USEDEP},designer?,gui?,help?,location?,multimedia?,network?,opengl?,positioning?,printsupport?,sensors?,serialport?,sql?,svg?,testlib?,webchannel?,websockets?,widgets?,x11extras?,xml(+)?,xmlpatterns?]
- dev-python/pyside2[${PYTHON_USEDEP},designer?,gui?,help?,location?,multimedia?,network?,opengl(+)?,positioning?,printsupport?,sensors?,serialport(+)?,sql?,svg?,testlib?,webchannel?,websockets?,widgets?,x11extras?,xml?,xmlpatterns?]
- )
-
- webengine? ( || (
- dev-python/PyQtWebEngine[${PYTHON_USEDEP}]
- dev-python/pyside2[${PYTHON_USEDEP},webengine]
- ) )
-
- qml? ( || (
- dev-python/PyQt5[${PYTHON_USEDEP},declarative]
- dev-python/pyside2[${PYTHON_USEDEP},qml]
- ) )
-
- quick? ( || (
- dev-python/PyQt5[${PYTHON_USEDEP},declarative]
- dev-python/pyside2[${PYTHON_USEDEP},quick]
- ) )
-
- declarative? ( || (
- dev-python/PyQt5[${PYTHON_USEDEP},declarative]
- dev-python/pyside2[${PYTHON_USEDEP},qml,quick]
- ) )
-"
-
-# These bindings are currently only provided by PyQt5 or PySide2
-# but not by both. Just DEPEND on these directly if they are
-# required.
-# Please check periodically if this list is still up to date
-#
-# bluetooth? ( dev-python/PyQt5[${PYTHON_USEDEP},bluetooth] )
-# dbus? ( dev-python/PyQt5[${PYTHON_USEDEP},dbus] )
-# examples? ( dev-python/PyQt5[${PYTHON_USEDEP},examples] )
-# networkauth? ( dev-python/PyQt5[${PYTHON_USEDEP},networkauth] )
-# ssl? ( dev-python/PyQt5[${PYTHON_USEDEP},ssl] )
-# webkit? ( dev-python/PyQt5[${PYTHON_USEDEP},webkit] )
-#
-# 3d? ( dev-python/pyside2[${PYTHON_USEDEP},3d] )
-# charts? ( dev-python/pyside2[${PYTHON_USEDEP},charts] )
-# concurrent? ( dev-python/pyside2[${PYTHON_USEDEP},concurrent] )
-# datavis? ( dev-python/pyside2[${PYTHON_USEDEP},datavis] )
-# scxml? ( dev-python/pyside2[${PYTHON_USEDEP},scxml] )
-# script? ( dev-python/pyside2[${PYTHON_USEDEP},script] )
-# scripttools? ( dev-python/pyside2[${PYTHON_USEDEP},scripttools] )
-# speech? ( dev-python/pyside2[${PYTHON_USEDEP},speech] )
-
-# The QtPy testsuite skips tests for bindings that are
-# not installed, so here we ensure that everything
-# is available and all tests are run.
-BDEPEND="test? (
- dev-python/PyQt5[${PYTHON_USEDEP},bluetooth,dbus,declarative,designer,gui,help,location,multimedia,network,networkauth,opengl,positioning,printsupport,sensors,serialport,sql,ssl,svg,testlib,webchannel,webkit,websockets,widgets,x11extras,xml(+),xmlpatterns]
- dev-python/PyQtWebEngine[${PYTHON_USEDEP}]
- dev-python/pyside2[${PYTHON_USEDEP},3d,charts,concurrent,datavis,designer,gui,help,location,multimedia,network,opengl(+),positioning,printsupport,qml,quick,script,scripttools,scxml,sensors,serialport(+),speech,sql,svg,testlib,webchannel,webengine,websockets,widgets,x11extras,xml,xmlpatterns]
-)"
-
-distutils_enable_tests pytest
-
-python_test() {
- export QT_API="pyqt5"
- virtx pytest -vv
- export QT_API="pyside2"
- virtx pytest -vv
- unset QT_API
-}
diff --git a/dev-python/QtPy/QtPy-1.9.0-r4.ebuild b/dev-python/QtPy/QtPy-1.9.0-r4.ebuild
new file mode 100644
index 000000000000..0aa58b9aaab0
--- /dev/null
+++ b/dev-python/QtPy/QtPy-1.9.0-r4.ebuild
@@ -0,0 +1,140 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{7..8} )
+
+inherit distutils-r1 virtualx
+
+DESCRIPTION="Abstraction layer on top of PyQt5 and PySide2 and additional custom QWidgets"
+HOMEPAGE="https://github.com/spyder-ide/qtpy/"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~x86"
+
+_IUSE_QT_MODULES="
+ declarative designer gui help location multimedia network opengl
+ positioning printsupport sensors serialport sql svg testlib webchannel
+ webengine websockets widgets x11extras xml xmlpatterns
+"
+IUSE="+pyqt5 pyside2 ${_IUSE_QT_MODULES}"
+unset _IUSE_QT_MODULES
+
+REQUIRED_USE="
+ || ( pyqt5 pyside2 )
+ test? ( pyqt5 pyside2 )
+"
+
+# These flags are currently *not* common to both the PySide2 and PyQt5 ebuild
+# Disable them for now, please check periodically if this is still up to date.
+# bluetooth? ( pyqt5 )
+# dbus? ( pyqt5 )
+# networkauth? ( pyqt5 )
+# webkit? ( pyqt5 )
+#
+# 3d? ( pyside2 )
+# charts? ( pyside2 )
+# concurrent? ( pyside2 )
+# datavis? ( pyside2 )
+# scxml? ( pyside2 )
+# script? ( pyside2 )
+# scripttools? ( pyside2 )
+# speech? ( pyside2 )
+
+# 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 PyQt5 provides this in a separate package
+# while PySide2 ships it in the same package.
+#
+# declarative/qml/quick is a special case, because PyQt5 bundles the bindings
+# for qml and quick in one flag: declarative PySide2 does not.
+#
+# The PyQt5 ebuild currently enables xml support unconditionally, the flag is
+# added anyway with a (+) to make it future proof if the ebuild were to change
+# this behaviour in the future.
+#
+# The PySide2 ebuild currently enables opengl and serialport support
+# unconditionally, the flag is added anyway with a (+) to make it future proof
+# if the ebuild were to change this behaviour in the future.
+RDEPEND="
+ pyqt5? (
+ dev-python/PyQt5[${PYTHON_USEDEP}]
+ dev-python/PyQt5[declarative?,designer?,gui?,help?,location?]
+ dev-python/PyQt5[multimedia?,network?,opengl?,positioning?]
+ dev-python/PyQt5[printsupport?,sensors?,serialport?,sql?,svg?]
+ dev-python/PyQt5[testlib?,webchannel?,websockets?,widgets?]
+ dev-python/PyQt5[x11extras?,xml(+)?,xmlpatterns?]
+ webengine? ( dev-python/PyQtWebEngine[${PYTHON_USEDEP}] )
+ )
+ pyside2? (
+ dev-python/pyside2[${PYTHON_USEDEP}]
+ dev-python/pyside2[designer?,gui?,help?,location?,multimedia?]
+ dev-python/pyside2[network?,opengl(+)?,positioning?,printsupport?]
+ dev-python/pyside2[sensors?,serialport(+)?,sql?,svg?,testlib?]
+ dev-python/pyside2[webchannel?,webengine?,websockets?,widgets?]
+ dev-python/pyside2[x11extras?,xml?,xmlpatterns?]
+ declarative? ( dev-python/pyside2[qml,quick] )
+ )
+"
+
+# 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? (
+ dev-python/mock[${PYTHON_USEDEP}]
+ dev-python/PyQt5[${PYTHON_USEDEP}]
+ dev-python/PyQt5[bluetooth,dbus,declarative,designer,gui,help,location]
+ dev-python/PyQt5[multimedia,network,networkauth,opengl,positioning]
+ dev-python/PyQt5[printsupport,sensors,serialport,sql,svg,testlib]
+ dev-python/PyQt5[webchannel,websockets,widgets,x11extras,xml(+)]
+ dev-python/PyQt5[xmlpatterns]
+ dev-python/PyQtWebEngine[${PYTHON_USEDEP}]
+ dev-python/pyside2[${PYTHON_USEDEP}]
+ dev-python/pyside2[3d,charts,concurrent,datavis,designer,gui,help]
+ dev-python/pyside2[location,multimedia,network,opengl(+),positioning]
+ dev-python/pyside2[printsupport,qml,quick,script,scripttools,scxml]
+ dev-python/pyside2[sensors,serialport(+),speech,sql,svg,testlib]
+ dev-python/pyside2[webchannel,webengine,websockets,widgets,x11extras]
+ dev-python/pyside2[xml,xmlpatterns]
+)"
+
+distutils_enable_tests pytest
+
+src_prepare() {
+ default
+ if ! use pyqt5; then
+ sed -i -e "s/from PyQt5.QtCore import/raise ImportError #/" qtpy/__init__.py || die
+ fi
+ if ! use pyside2; then
+ sed -i -e "s/from PySide2 import/raise ImportError #/" qtpy/__init__.py || die
+ fi
+
+ # Disable outdated PyQt4 and PySide
+ sed -i -e "s/from PyQt4.Qt import/raise ImportError #/" qtpy/__init__.py || die
+ sed -i -e "s/from PyQt4.QtCore import/raise ImportError #/" qtpy/__init__.py || die
+ sed -i -e "s/from PySide import/raise ImportError #/" qtpy/__init__.py || die
+}
+
+src_test() {
+ virtx python_foreach_impl python_test
+}
+
+python_test() {
+ local -x QT_API
+ for QT_API in pyqt5 pyside2; do
+ epytest
+ done
+}
+
+pkg_postinst() {
+ if use pyqt5 && use pyside2; then
+ ewarn "You have enabled both PyQt5 and PySide2, note that QtPy will default"
+ ewarn "to PyQt5 unless the QT_API environment variable overrides this."
+ fi
+}
diff --git a/dev-python/QtPy/metadata.xml b/dev-python/QtPy/metadata.xml
index 582ff9f96b87..605a0838da71 100644
--- a/dev-python/QtPy/metadata.xml
+++ b/dev-python/QtPy/metadata.xml
@@ -5,20 +5,18 @@
<email>python@gentoo.org</email>
<name>Gentoo Python Project</name>
</maintainer>
- <maintainer type="person" proxied="yes">
- <email>andrewammerlaan@riseup.net</email>
+ <maintainer type="person">
+ <email>andrewammerlaan@gentoo.org</email>
<name>Andrew Ammerlaan</name>
</maintainer>
- <maintainer type="project" proxied="proxy">
- <email>proxy-maint@gentoo.org</email>
- <name>Proxy Maintainers</name>
- </maintainer>
<longdescription>
QtPy is a small abstraction layer that lets you write applications using a single API call to either PyQt or PySide.
It provides support for PyQt5, PyQt4, PySide2 and PySide using the Qt5 layout (where the QtGui module has been split into QtGui and QtWidgets).
Basically, you can write your code as if you were using PySide2 but import Qt modules from qtpy instead of PySide2 (or PyQt5)
</longdescription>
<use>
+ <flag name="pyqt5">Use <pkg>dev-python/PyQt5</pkg> as Qt for Python implementation</flag>
+ <flag name="pyside2">Use <pkg>dev-python/pyside2</pkg> as Qt for Python implementation</flag>
<flag name="declarative">Pull in bindings for the QtQml/QtQuick modules and enable the qmlscene plugin</flag>
<flag name="designer">Pull in bindings for the QtDesigner module and enable the designer plugin</flag>
<flag name="gui">Pull in bindings for the QtGui module</flag>
@@ -29,8 +27,6 @@
<flag name="opengl">Pull in bindings for the QtOpenGL module</flag>
<flag name="positioning">Pull in bindings for the QtPositioning module</flag>
<flag name="printsupport">Pull in bindings for the QtPrintSupport module</flag>
- <flag name="qml">Pull in QtQml module</flag>
- <flag name="quick">Pull in QtQuick and QtQuickWidgets modules</flag>
<flag name="sensors">Pull in bindings for the QtSensors module</flag>
<flag name="serialport">Pull in bindings for the QtSerialPort module</flag>
<flag name="sql">Pull in bindings for the QtSql module</flag>