%global srcname xd %global pypi_name xdfile %global date 20220220 %global commit 7bcdbe6810c2d69971f1a41be5d38c21a77278c7 %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: python-%{pypi_name} Version: 1.9.0~%{date}git%{shortcommit} Release: %autorelease Summary: Python parser for .xd crossword format License: MIT URL: https://github.com/century-arcade/xd Source: %{url}/archive/%{commit}/%{srcname}-%{commit}.tar.gz BuildArch: noarch BuildRequires: python3-devel BuildRequires: python3-pytest %global _description %{expand: This package provides a simple parser for .xd -- a corpus-oriented format, modeled after the simplicity and intuitiveness of the markdown format. It supports 99.99% of published crosswords, and is intended to be convenient for bulk analysis of crosswords by both humans and machines, from the present and into the future.} %description %_description %package -n python3-%{pypi_name} Summary: %{summary} %description -n python3-%{pypi_name} %_description %prep %autosetup -p1 -n %{srcname}-%{commit} # remove bundled libraries rm -r crossword puz.py %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install %pyproject_save_files %{pypi_name} # remove sample script rm %{buildroot}%{_bindir}/sample %check # remove broken test rm xdfile/tests/test_xdfile.py %pytest %files -n python3-%{pypi_name} -f %{pyproject_files} %license LICENSE %doc README.md %changelog %autochangelog