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

Name:           jello
Version:        1.6.0
Release:        %autorelease
Summary:        Query JSON at the command line with Python syntax

# SPDX
License:        MIT
URL:            https://github.com/kellyjonbrazil/jello
# GitHub archive contains tests; PyPI sdist does not.
Source:         %{url}/archive/v%{version}/jello-%{version}.tar.gz

BuildArch:      noarch

BuildRequires:  python3-devel

%description
Query, filter, and transform JSON and JSON Lines at the command line with
Python syntax.


%prep
%autosetup


%generate_buildrequires
%pyproject_buildrequires


%build
%pyproject_wheel


%install
%pyproject_install
%pyproject_save_files jello

install -t '%{buildroot}%{_mandir}/man1' -D -p -m 0644 man/*


%check
PYTHONPATH='%{buildroot}%{python3_sitelib}' ./runtests.sh


%files -f %{pyproject_files}
# pyproject_files handles LICENSE; verify with “rpm -qL -p …”
%doc ADVANCED_USAGE.md
%doc CHANGELOG
%doc README.md

%{_bindir}/jello
%{_mandir}/man1/jello.1*


%changelog
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild

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

* Sun Apr 30 2023 Benjamin A. Beasley <code@musicinmybrain.net> - 1.6.0-1
- Update to 1.6.0 (close RHBZ#2192142)

* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.5-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild

* Sun Jan 15 2023 Benjamin A. Beasley <code@musicinmybrain.net> - 1.5.5-2
- Upload missing source archive

* Sun Jan 15 2023 Benjamin A. Beasley <code@musicinmybrain.net> - 1.5.5-1
- Update to 1.5.5 (close RHBZ#2160991)

* Sun Jul 31 2022 Benjamin A. Beasley <code@musicinmybrain.net> - 1.5.4-1
- Update to 1.5.4 (close RHBZ#2112580)

* Sun Jul 31 2022 Benjamin A. Beasley <code@musicinmybrain.net> - 1.5.2-5
- Confirm that License is SPDX MIT (no License field change)

* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild

* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 1.5.2-3
- Rebuilt for Python 3.11

* Tue Mar 01 2022 Benjamin A. Beasley <code@musicinmybrain.net> - 1.5.2-2
- Drop duplicate dependency on Pygments

* Tue Mar 01 2022 Benjamin A. Beasley <code@musicinmybrain.net> - 1.5.2-1
- Initial package (close RHBZ#2059247)