python3-QtPy: update to 2.4.0, adopt.

This commit is contained in:
Gonzalo Tornaría 2023-09-29 22:50:26 -03:00 committed by Andrew J. Hesford
parent 19178386ef
commit 3ba5368104
2 changed files with 30 additions and 17 deletions

View File

@ -0,0 +1,11 @@
--- a/qtpy/tests/test_main.py 2023-08-29 13:07:50.000000000 -0300
+++ b/qtpy/tests/test_main.py 2023-09-29 22:04:52.945280612 -0300
@@ -115,7 +115,7 @@
pytest.importorskip(mod, reason=f"Requires {api}")
# clean env
env = os.environ.copy()
- for key in ("QT_API", "USE_QT_API"):
+ for key in ("QT_API", "USE_QT_API", "FORCE_QT_API"):
if key in env:
del env[key]
cmd = f"""

View File

@ -1,36 +1,38 @@
# Template file for 'python3-QtPy'
pkgname=python3-QtPy
version=2.3.1
version=2.4.0
revision=1
build_style=python3-pep517
hostmakedepends="python3-setuptools python3-wheel"
# depends on either of PyQt5, PyQt6
depends="python3"
# Packages common to both PyQt5 and PyQt6
_qtcommon="python3-PyQt5-sql python3-PyQt5-svg python3-PyQt5-webengine
python3-PyQt5-websockets python3-PyQt5-multimedia python3-PyQt5-tools"
checkdepends="python3-pytest python3-mock python3-pyqt6-declarative
python3-pyqt6-widgets python3-pyqt6-gui python3-pyqt6-opengl-widgets
python3-pyqt6-printsupport python3-pyqt6-network python3-pyqt6-devel-tools
python3-pyqt6-test python3-pyqt6-webchannel python3-pyqt6-xml
qt6-plugin-sqlite python3-PyQt5-quick python3-PyQt5-xmlpatterns
python3-PyQt5-location python3-PyQt5-opengl qt5-plugin-sqlite ${_qtcommon}
${_qtcommon//PyQt5/pyqt6}"
# check dependencies common to both PyQt5 and PyQt6
_qtcommon=":connectivity :multimedia :sensors :serialport :sql :svg :tools
:webchannel :webengine :websockets"
# check dependencies only for PyQt5
_qt5check="${_qtcommon} :location :opengl :quick :x11extras :xmlpatterns
qt5-plugin-sqlite"
# check dependencies only for PyQt6
_qt6check="${_qtcommon} :dbus :declarative :devel-tools :gui :network
:opengl-widgets :printsupport :quick3d :remoteobjects :test :widgets :xml
qt6-plugin-sqlite"
checkdepends="python3-pytest-cov python3-pytest-qt font-liberation-ttf
${_qt5check//:/python3-PyQt5-} ${_qt6check//:/python3-pyqt6-}"
short_desc="Abstraction layer on top of various Python Qt bindings"
maintainer="Orphaned <orphan@voidlinux.org>"
maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
license="MIT"
homepage="https://github.com/spyder-ide/qtpy"
changelog="https://raw.githubusercontent.com/spyder-ide/qtpy/master/CHANGELOG.md"
distfiles="${PYPI_SITE}/Q/QtPy/QtPy-${version}.tar.gz"
checksum=a8c74982d6d172ce124d80cafd39653df78989683f760f2281ba91a6e7b9de8b
checksum=db2d508167aa6106781565c8da5c6f1487debacba33519cedc35fa8997d424d4
do_check() {
local qtapi
rm -f pytest.ini
for qtapi in pyqt5 pyqt6; do
CI=1 USE_QT_API="${qtapi}" QT_API="${qtapi}" \
python3 -m pytest -k 'not test_qttexttospeech' qtpy/tests
msg_normal "... running pytest with QT_API=$qtapi\n"
FORCE_QT_API=1 QT_API="${qtapi}" \
python3 -m pytest -k 'not test_qttexttospeech'
done
}