%global srcname pytest-qt Name: python-%{srcname} Version: 4.3.1 Release: %autorelease Summary: pytest support for PyQt and PySide applications License: MIT URL: http://github.com/pytest-dev/pytest-qt Source: %{pypi_source} BuildArch: noarch BuildRequires: python3-devel BuildRequires: (python3dist(pyqt6) or python3dist(pyqt5) or python3dist(pyside6) or python3dist(pyside2)) %global _description %{expand: pytest-qt is a pytest plugin that allows programmers to write tests for PyQt5, PyQt6, PySide2 and PySide6 applications.} %description %_description %package -n python3-%{srcname} Summary: %{summary} Requires: (python3dist(pyqt6) or python3dist(pyqt5) or python3dist(pyside6) or python3dist(pyside2)) %description -n python3-%{srcname} %_description %package doc Summary: Documentation for %{name} %description doc %_description This package contains additional documentation for %{name}. %prep %autosetup -p1 -n %{srcname}-%{version} %generate_buildrequires %pyproject_buildrequires -t -x doc %build %pyproject_wheel # Build docs sphinx-build-3 docs html %install %pyproject_install %pyproject_save_files pytestqt %check # https://github.com/pytest-dev/pytest-qt/issues/179 export QT_LOGGING_RULES='default.debug=true' %tox %files -n python3-%{srcname} -f %{pyproject_files} %doc README.rst CHANGELOG.rst %files doc %license LICENSE %doc html %changelog %autochangelog