File python-qt-material.spec of Package python-qt-material
#
# spec file for package python-qt-material
#
# copyright (c) 2025 munix9@googlemail.com
#
%{?sle15_python_module_pythons}
Name: python-qt-material
Version: 2.17
Release: 0
Summary: Material inspired stylesheet for PySide and PyQt
License: BSD-2-Clause
URL: https://github.com/dunderlab/qt-material
Source0: https://files.pythonhosted.org/packages/source/q/qt-material/qt_material-%{version}.tar.gz
BuildRequires: %{python_module Jinja2}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: google-roboto-fonts
BuildRequires: python-rpm-macros
Requires: google-roboto-fonts
Requires: python-Jinja2
BuildArch: noarch
%python_subpackages
%description
Qt-Material is a modern stylesheet library for PySide and PyQt,
inspired by Material Design.
%prep
%autosetup -n qt_material-%{version} -p1
%build
%pyproject_wheel
%install
%pyproject_install
%{python_expand # use system fonts
_src="%{_datadir}/fonts/truetype"
_dst="%{buildroot}%{$python_sitelib}/qt_material/fonts/roboto"
for f in ${_dst}/Roboto*.ttf ; do
ln -sf "${_src}/$(basename "$f")" "${_dst}"
done
}
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
%pytest
%files %{python_files}
%license LICENSE
%doc README.md
%{python_sitelib}/qt_material
%{python_sitelib}/qt_material-%{version}.dist-info
%changelog