## 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 gbulb

Name:           python-%{srcname}
Version:        0.6.5
Release:        %autorelease
Summary:        GLib event loop for tulip (PEP 3156)

License:        Apache-2.0
URL:            https://github.com/beeware/gbulb
Source:         %{pypi_source}
# upstream hardcodes arbitrary versions in dependencies to make their live
# easier (and harder for anybody else...); relax dependencies
Patch:          requirements-versions.patch
Patch:          0001-Fix-compatibility-with-Python-3.13.patch

BuildArch:      noarch
BuildRequires:  gtk3-devel
BuildRequires:  python3-devel

%global _description %{expand:
Gbulb is a Python library that implements a PEP 3156 interface for the GLib
main event loop under UNIX-like systems.}

%description %_description

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

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

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

%generate_buildrequires
%pyproject_buildrequires -t

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files %{srcname}

%check
%tox

%files -n python3-%{srcname} -f %{pyproject_files}
%doc README.rst AUTHORS.rst CHANGELOG.rst

%changelog
## START: Generated by rpmautospec
* Fri Sep 27 2024 Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com> - 0.6.5-2
- Backport a fix for Python 3.13 compatibility

* Fri Sep 27 2024 Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com> - 0.6.5-1
- Update to 0.6.5

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

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

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

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

* Sat Dec 30 2023 Davide Cavalca <dcavalca@fedoraproject.org> - 0.6.4-1
- Initial import; Fixes: RHBZ#2195957
## END: Generated by rpmautospec