void-packages/srcpkgs/python3-QtPy/template

40 lines
1.3 KiB
Bash

# Template file for 'python3-QtPy'
pkgname=python3-QtPy
version=2.3.1
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}"
short_desc="Abstraction layer on top of various Python Qt bindings"
maintainer="Orphaned <orphan@voidlinux.org>"
license="MIT"
homepage="https://github.com/spyder-ide/qtpy"
distfiles="${PYPI_SITE}/Q/QtPy/QtPy-${version}.tar.gz"
checksum=a8c74982d6d172ce124d80cafd39653df78989683f760f2281ba91a6e7b9de8b
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
done
}
post_install() {
vlicense LICENSE.txt
}