Blame python-puzpy.spec

1cb78d1
%global srcname puzpy
1cb78d1
1cb78d1
Name:           python-%{srcname}
1cb78d1
# The latest GitHub tag is 0.2.4, while the version on pypi is 0.2.5; the
1cb78d1
# latter includes an fixup commit and doesn't include tests. For this reason,
1cb78d1
# we use the GitHub tarball and add the fixup commit here, but keep the version
1cb78d1
# as 0.2.4, as it was never actually bumped in GitHub (see issue #27).
1cb78d1
Version:        0.2.4
1cb78d1
Release:        %autorelease
1cb78d1
Summary:        Python crossword puzzle library
1cb78d1
1cb78d1
License:        MIT
1cb78d1
URL:            https://github.com/alexdej/puzpy
1cb78d1
Source:         %{url}/archive/v%{version}/%{srcname}-%{version}.tar.gz
1cb78d1
# Missing test file
1cb78d1
Source1:        %{url}/raw/2813e095e267b3487e7fecf44981e4f179aeb9ed/testfiles/nyt_v1_4.puz
1cb78d1
# Fixup commit
1cb78d1
Patch:          %{url}/commit/6109ad5a54359262010d01f2e0175d928bd70962.patch
1cb78d1
1cb78d1
BuildArch:      noarch
1cb78d1
BuildRequires:  python3-devel
1cb78d1
1cb78d1
%global _description %{expand:
1cb78d1
Implementation of .puz crossword puzzle file parser based on the .puz file
1cb78d1
format documentation.}
1cb78d1
1cb78d1
%description %_description
1cb78d1
1cb78d1
%package -n     python3-%{srcname}
1cb78d1
Summary:        %{summary}
1cb78d1
1cb78d1
%description -n python3-%{srcname} %_description
1cb78d1
1cb78d1
%prep
1cb78d1
%autosetup -p1 -n %{srcname}-%{version}
1cb78d1
# Add missing test artifact
1cb78d1
cp -p %SOURCE1 testfiles
1cb78d1
1cb78d1
%generate_buildrequires
1cb78d1
%pyproject_buildrequires -t
1cb78d1
1cb78d1
%build
1cb78d1
%pyproject_wheel
1cb78d1
1cb78d1
%install
1cb78d1
%pyproject_install
1cb78d1
1cb78d1
%check
1cb78d1
%tox
1cb78d1
1cb78d1
%files -n python3-%{srcname}
1cb78d1
%doc CHANGELOG.rst README.rst
1cb78d1
%pycached %{python3_sitelib}/puz.py
1cb78d1
%{python3_sitelib}/%{srcname}-%{version}.dist-info
1cb78d1
1cb78d1
%changelog
1cb78d1
%autochangelog