## START: Set by rpmautospec
## (rpmautospec version 0.6.0)
## RPMAUTOSPEC: autorelease, autochangelog
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
    release_number = 2;
    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 referencing

Name:           python-%{srcname}
Version:        0.35.1
Release:        %autorelease
Summary:        An implementation-agnostic implementation of JSON reference resolution
License:        MIT
URL:            https://pypi.python.org/pypi/%{srcname}
Source:         %{pypi_source referencing}

BuildArch:      noarch

BuildRequires:  python3-devel

# For tests
BuildRequires:  python3dist(pytest)
BuildRequires:  python3dist(pytest-subtests)

%global _description %{expand:
An implementation-agnostic implementation of JSON reference resolution.
In other words, a way for e.g. JSON Schema tooling to resolve the $ref
keyword across all drafts without needing to implement support themselves.}

%description %_description


%package -n     python3-%{srcname}
Summary:        %{summary}

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


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


%generate_buildrequires
%pyproject_buildrequires


%build
%pyproject_wheel


%install
%pyproject_install
%pyproject_save_files %{srcname}


%check
%pyproject_check_import -e referencing.tests*
%pytest referencing/tests


%files -n python3-%{srcname} -f %{pyproject_files}


%changelog
## START: Generated by rpmautospec
* Fri Jun 07 2024 Python Maint <python-maint@redhat.com> - 0.35.1-2
- Rebuilt for Python 3.13

* Fri May 24 2024 Mattia Verga <mattia.verga@proton.me> - 0.35.1-1
- Update to 0.35.1 (fedora#2278481)

* Thu Apr 25 2024 Mattia Verga <mattia.verga@proton.me> - 0.35.0-1
- Update to 0.35.0 (fedora#2252154)

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

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

* Thu Dec 28 2023 Mattia Verga <mattia.verga@proton.me> - 0.31.1-1
- Update to 0.31.1

* Wed Nov 15 2023 Joel Capitao <jcapitao@redhat.com> - 0.31.0-1
- Update to 0.31.0 (close RHBZ#2249681)

* Sat Aug 05 2023 Benjamin A. Beasley <code@musicinmybrain.net> - 0.30.2-1
- Update to 0.30.2 (close RHBZ#2229137)

* Wed Jul 26 2023 Mattia Verga <mattia.verga@proton.me> - 0.30.0-1
- Initial import (fedora#2223179)
## END: Generated by rpmautospec