## START: Set by rpmautospec
## (rpmautospec version 0.7.3)
## 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 forgeurl https://github.com/asottile/tokenize-rt
Version:        6.1.0
%forgemeta

Name:           python-tokenize-rt
Release:        %autorelease
Summary:        Wrapper for Python's stdlib `tokenize` supporting roundtrips
License:        MIT
URL:            %{forgeurl}
Source:         %{forgesource}

BuildArch:      noarch
BuildRequires:  python3-devel
# Testing requirements
# covdefaults (from tox.ini -> requirements-dev.txt) is not packaged
# for Fedora, using pytest directly
BuildRequires:  python3dist(pytest)

%global _description %{expand:
The stdlib tokenize module does not properly roundtrip. This wrapper
around the stdlib provides two additional tokens ESCAPED_NL and
UNIMPORTANT_WS, and a Token data type. Use src_to_tokens and
tokens_to_src to roundtrip. This library is useful if you are writing
a refactoring tool based on the python tokenization.}

%description %_description

%package -n python3-tokenize-rt
Summary:        %{summary}

%description -n python3-tokenize-rt %_description


%prep
%autosetup -p1 -n tokenize-rt-%{version}


%generate_buildrequires
%pyproject_buildrequires -r


%build
%pyproject_wheel


%install
%pyproject_install
%pyproject_save_files tokenize_rt


%check
%pytest


%files -n python3-tokenize-rt -f %{pyproject_files}
%doc README.md
%{_bindir}/tokenize-rt


%changelog
## START: Generated by rpmautospec
* Tue Oct 22 2024 Packit <hello@packit.dev> - 6.1.0-1
- Update to 6.1.0 upstream release
- Resolves: rhbz#2320841

* Sun Aug 25 2024 Packit <hello@packit.dev> - 6.0.0-1
- Update to 6.0.0 upstream release
- Resolves: rhbz#2302749

* Tue Aug 20 2024 Roman Inflianskas <rominf@pm.me> - 5.2.0-7
- Use forges

* Fri Jul 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 5.2.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild

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

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

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

* Mon Jul 31 2023 Roman Inflianskas <rominf@aiven.io> - 5.2.0-1
- Update to 5.2.0 (fedora#2227583)

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

* Thu Jul 06 2023 Maxwell G <maxwell@gtmx.me> - 5.1.0-1
- Update to 5.1.0.
- Fix Python 3.12 test failures.
- Fixes: rhbz#2220538

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

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

* Tue Oct 04 2022 Roman Inflianskas <rominf@aiven.io> - 5.0.0-1
- Update to 5.0.0 (resolve rhbz#2131856)

* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 4.2.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild

* Wed Jul 13 2022 Roman Inflianskas <rominf@aiven.io> - 4.2.1-1
- Initial package


## END: Generated by rpmautospec