%global pypi_name imgkit Name: python-%{pypi_name} Version: 1.2.3 Release: 2%{?dist} Summary: Wkhtmltoimage python wrapper to convert HTML to image License: MIT URL: https://github.com/jarrekk/imgkit Source0: %{pypi_source %{pypi_name}} BuildArch: noarch BuildRequires: python3-devel %description imgkit is a thin Python wrapper around the wkhtmltoimage command-line tool, rendering HTML to PNG or JPG. It is a dependency of TotalSegmentator, which uses it to render the preview images in segmentation reports. %package -n python3-%{pypi_name} Summary: %{summary} # Runtime dependencies belong HERE, on the subpackage that is actually built. # Placed in the preamble in -1, where it attached to the never-built python- # imgkit source package: rpm -qpR on the -1 rpm showed only # python3.14dist(six). # imgkit shells out to wkhtmltoimage; without it every conversion raises at # runtime. A Requires rather than a Recommends because the module's only purpose # is driving that binary. Requires: wkhtmltopdf %description -n python3-%{pypi_name} %{summary}. %prep %autosetup -n %{pypi_name}-%{version} -p1 %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install %pyproject_save_files -l %{pypi_name} %check %pyproject_check_import %files -n python3-%{pypi_name} -f %{pyproject_files} %changelog * Fri Sep 25 2026 Morgan Hough - 1.2.3-1 - Initial package. Required by TotalSegmentator, which is in turn required by the 3dslicer-totalsegmentator extension -- that extension currently ships and imports a module nothing provides. - PyPI declares no licence; taken as MIT from the upstream repository, which declares MIT via GitHub's licence detection and ships a LICENSE file.