%global pypi_name pyqtdarktheme Name: python-%{pypi_name} Version: 2.1.0 Release: 1%{?dist} Summary: Flat dark theme for PySide and PyQt License: MIT URL: https://github.com/5yutan5/PyQtDarkTheme Source0: %{pypi_source %{pypi_name}} BuildArch: noarch BuildRequires: python3-devel %global _description %{expand: PyQtDarkTheme applies a flat dark (or light) theme to Qt for Python applications. datalad-gooey uses it.} %description %{_description} %package -n python3-%{pypi_name} Summary: %{summary} %description -n python3-%{pypi_name} %{_description} %prep %autosetup -p1 -n pyqtdarktheme-%{version} # Upstream (archived in 2023) caps Python <3.12 and darkdetect <0.8. Neither cap is # needed: %check loads the stylesheets on this Python with this darkdetect. sed -i -E 's/^python = ">=3.7,<3.12"/python = ">=3.7"/; s/^darkdetect = "\^0.7.1"/darkdetect = ">=0.7.1"/' pyproject.toml grep -q '^python = ">=3.7"$' pyproject.toml grep -q '^darkdetect = ">=0.7.1"$' pyproject.toml sed -i -E 's/^Requires-Python: .*/Requires-Python: >=3.7/' PKG-INFO %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install # Build helpers some DataLad-template projects install at top level; not part of the package. rm -rf %{buildroot}%{python3_sitelib}/_datalad_buildsupport %{buildroot}%{python3_sitelib}/tools %{buildroot}%{python3_sitelib}/benchmarks %{buildroot}%{python3_sitelib}/tests %{buildroot}%{python3_sitelib}/tests.py %pyproject_save_files -l qdarktheme %check export QT_QPA_PLATFORM=offscreen %pyproject_check_import -e 'qdarktheme.tests*' -e 'qdarktheme.*.tests*' %{py3_test_envvars} %{python3} -c 'import qdarktheme; s = qdarktheme.load_stylesheet("dark"); assert len(s) > 1000, len(s); print("stylesheet", len(s))' %files -n python3-%{pypi_name} -f %{pyproject_files} %changelog * Mon Oct 12 2026 Morgan Hough - 2.1.0-1 - Initial package, for the DataLad extension stack and dandi.