%define pypi_name scour Name: python-%{pypi_name} Version: 0.38.2 Release: %mkrel 3 Summary: An SVG Optimizer / Cleaner Group: Development/Python License: ASL 2.0 URL: https://github.com/scour-project/scour Source0: %{pypi_source} BuildArch: noarch BuildRequires: python3-devel BuildRequires: python3-setuptools # Tests BuildRequires: python3-six BuildRequires: python3-flake8 %description 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. %package -n python3-%{pypi_name} Summary: An SVG Optimizer / Cleaner Group: Development/Python %{?python_provide:%python_provide python3-%{pypi_name}} %description -n python3-%{pypi_name} 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. %prep %autosetup -n %{pypi_name}-%{version} # Remove bundled egg-info rm -rf %{pypi_name}.egg-info # Better safe than sorry find . -type f -name '*.py' -exec sed -i /env\ python/d {} ';' find . -type f -name '*.py' -exec sed -i /env\ python/d {} ';' %build %py3_build %install %py3_install %check %{__python3} setup.py test %files -n python3-%{pypi_name} %doc README.md %{_bindir}/%{pypi_name} %{python3_sitelib}/%{pypi_name}/ %{python3_sitelib}/%{pypi_name}-%{version}* %changelog * Sun Mar 27 2022 umeabot <umeabot> 0.38.2-3.mga9 + Revision: 1829112 - Mageia 9 Mass Rebuild * Sat Feb 12 2022 tv <tv> 0.38.2-2.mga9 + Revision: 1773455 - Rebuild for python-3.10 * Thu May 27 2021 daviddavid <daviddavid> 0.38.2-1.mga9 + Revision: 1728576 - initial package python-scour (needed for inkscape)