Name: python-optimize-images Version: 2.2.0 Release: 1%{?dist} Summary: Reduce the file size of JPEG, PNG and WebP images License: MIT URL: https://github.com/victordomingos/optimize-images # The PyPI sdist lacks tests/helpers.py. Source0: %{url}/archive/v.%{version}/optimize-images-%{version}.tar.gz BuildArch: noarch BuildRequires: python3-devel BuildRequires: python3-pytest %global _description %{expand: optimize-images is a command-line tool and Python library, written in pure Python on top of Pillow, that recompresses JPEG, PNG and WebP images to make them smaller. It can downscale, convert formats, strip or keep metadata, pick JPEG quality dynamically and watch a folder for new images.} %description %{_description} %package -n python3-optimize-images Summary: %{summary} %description -n python3-optimize-images %{_description} %prep %autosetup -n optimize-images-v.%{version} # Upstream asks for Pillow 13 (only rawhide has it) but uses no API newer # than Pillow 11; the test suite, including its Pillow API scan, decides. sed -i "s/'Pillow>=13.0.0'/'Pillow>=11.0'/" setup.py grep -q "'Pillow>=11.0'" setup.py %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install %pyproject_save_files -l optimize_images %check # The SSIM tests skip themselves without scikit-image (the optional ssim # extra). %pytest %files -n python3-optimize-images -f %{pyproject_files} %doc README.md %{_bindir}/optimize-images %changelog * Sun Nov 01 2026 Morgan Hough - 2.2.0-1 - Initial package