## START: Set by rpmautospec
## (rpmautospec version 0.6.0)
## RPMAUTOSPEC: autorelease, autochangelog
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
    release_number = 1;
    base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}"));
    print(release_number + base_release_number - 1);
}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}}
## END: Set by rpmautospec

%global srcname recordclass

Name:           python-%{srcname}
Version:        0.22.0.2
Release:        %autorelease
Summary:        Mutable variant of namedtuple

License:        MIT
URL:            https://github.com/intellimath/recordclass
Source:         %{pypi_source}

BuildRequires:  gcc
BuildRequires:  python3-devel

# https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval
ExcludeArch:    %{ix86}

%global _description %{expand:
Recordclass is Python library implementing a mutable variant of namedtuple,
which support assignments, and other memory saving variants.}

%description %_description

%package -n     python3-%{srcname}
Summary:        %{summary}
# Upstream stopped shipping examples on PyPI and the git repo doesn't have
# tagged releases.
Provides:       %{name}-doc = %{version}-%{release}
Obsoletes:      %{name}-doc < 0.21-2

%description -n python3-%{srcname} %_description

%prep
%autosetup -p1 -n %{srcname}-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files %{srcname}

%check
PYTHONPATH="%{buildroot}%{python3_sitearch}:%{buildroot}%{python3_sitelib}" \
  %python3 ./test_all.py

%files -n python3-%{srcname} -f %{pyproject_files}
%license LICENSE.txt
%doc README.md

%changelog
## START: Generated by rpmautospec
* Sun Jul 07 2024 Davide Cavalca <dcavalca@fedoraproject.org> - 0.22.0.2-1
- Update to 0.22.0.2; Fixes: RHBZ#2293801, RHBZ#2265475

* Fri Jun 07 2024 Python Maint <python-maint@redhat.com> - 0.21.1-4
- Rebuilt for Python 3.13

* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.21.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild

* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.21.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild

* Mon Nov 27 2023 Davide Cavalca <dcavalca@fedoraproject.org> - 0.21.1-1
- Update to 0.21.1; Fixes: RHBZ#2246287, RHBZ#2251801

* Tue Nov 07 2023 Davide Cavalca <dcavalca@fedoraproject.org> - 0.21-1
- Update to 0.21

* Sat Aug 12 2023 Davide Cavalca <dcavalca@fedoraproject.org> - 0.20-2
- Drop i686 build due to test failures

* Sat Aug 12 2023 Davide Cavalca <dcavalca@fedoraproject.org> - 0.20-1
- Update to 0.20; Fixes: RHBZ#2226314, RHBZ#2220479, RHBZ#2176168

* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.18.1.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild

* Tue Jun 13 2023 Python Maint <python-maint@redhat.com> - 0.18.1.1-3
- Rebuilt for Python 3.12

* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.18.1.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild

* Mon Jan 09 2023 Davide Cavalca <dcavalca@fedoraproject.org> - 0.18.1.1-1
- Initial import; Fixes: RHBZ#2158694
## END: Generated by rpmautospec