%global srcname scour %global forgeurl https://github.com/scour-project/scour Version: 0.38.2 %global tag v%{version} %forgemeta Name: python-%{srcname} Release: 1%{?dist} Summary: An SVG Optimizer / Cleaner License: Apache-2.0 URL: %forgeurl Source0: %{forgesource} BuildRequires: python3-devel # Tests BuildRequires: python3dist(six) BuildArch: noarch %global _description %{expand: Scour is an SVG optimizer/cleaner written in Python that reduces the size of scalable vector graphics by optimizing structure and removing unnecessary data. It can be used to create streamlined vector graphics suitable for web deployment, publishing/sharing or further processing. The goal of Scour is to output a file that renders identically at a fraction of the size by removing a lot of redundant information created by most SVG editors. Optimization options are typically lossless but can be tweaked for more aggressive cleaning.} %description %_description %package -n python3-%{srcname} Summary: %{summary} %{?python_provide:%python_provide python3-%{srcname}} %description -n python3-%{srcname} %_description %prep %autosetup -n %{srcname}-%{version} %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install %pyproject_save_files %{srcname} # Shebang fix %py3_shebang_fix %{buildroot}%{python3_sitelib}/scour/scour.py %py3_shebang_fix %{buildroot}%{python3_sitelib}/scour/svg_transform.py %py3_shebang_fix %{buildroot}%{python3_sitelib}/scour/yocto_css.py %check %pyproject_check_import %{py3_test_envvars} %{python3} setup.py test %files -n python3-%{srcname} -f %{pyproject_files} %{_bindir}/scour %doc README.md %doc HISTORY.md %changelog * Fri Sep 08 2023 Benson Muite - 0.38.2-1 - Initial package