%global srcname crccheck Name: python-%{srcname} Version: 1.3.0 Release: %autorelease Summary: Calculation library for CRCs and checksums License: MIT URL: https://github.com/MartinScharrer/crccheck # The PyPI tarball doesn't include tests Source: %{url}/archive/v%{version}/%{srcname}-%{version}.tar.gz BuildArch: noarch BuildRequires: make BuildRequires: python3-devel BuildRequires: python3-docs BuildRequires: python3dist(pytest) BuildRequires: python3dist(sphinx) BuildRequires: sed %global _description %{expand: This package provides the crccheck Python module, which implements all CRCs listed in the Catalogue of parametrised CRC algorithms as well as simple checksums.} %description %_description %package -n python3-%{srcname} Summary: %{summary} Suggests: %{name}-doc = %{version}-%{release} %description -n python3-%{srcname} %_description %package doc Summary: Documentation for %{name} Requires: python3-docs %description doc This package provides additional documentation for %{name}. %prep %autosetup -p1 -n %{srcname}-%{version} # Fix python binary invocations sed -i 's:python:python3:g' Makefile # Use local intersphinx inventory sed \ -e 's|\("https://docs\.python\.org/3", \)None|\1"%{_docdir}/python3-docs/html/objects.inv"|' \ -i docs/source/conf.py %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel make doc rm -r docs/build/{.buildinfo,.doctrees} %install %pyproject_install %pyproject_save_files %{srcname} %check %pytest %files -n python3-%{srcname} -f %{pyproject_files} %doc README.rst %files doc %license LICENSE.txt %doc docs/build %changelog %autochangelog