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

%global common_description %{expand:
A CLI to start local Cloud image on libvirt!

Virt-Lightning can quickly deploy a bunch of new VM. It also prepares the
Ansible inventory file!

This is handy to quickly validate a new Ansible playbook, or a role on a large
number of environments.}

Name:           %{srcname}
Version:        2.2.0
Release:        %autorelease
Summary:        A pure-Python implementation of the HTTP/2 priority tree

License:        Apache-2.0
URL:            https://virt-lightning.org
VCS:            https://github.com/virt-lightning/virt-lightning
Source0:        %{pypi_source virt-lightning}

BuildArch:      noarch
BuildRequires:  python3-devel
BuildRequires:  python3-pytest
Requires:       libvirt-daemon

%description %{common_description}

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

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files %{libname}

%check
%pytest

%files -f %{pyproject_files}
%license LICENSE-2.0.txt
%doc DEBUGGING.md README.md changelog.md conf/example.ini
%{_bindir}/virt-lightning
%{_bindir}/vl

%changelog
## START: Generated by rpmautospec
* Sat Jan 27 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild

* Sat Jul 22 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild

* Wed Jun 14 2023 Python Maint <python-maint@redhat.com> - 2.2.0-3
- Rebuilt for Python 3.12

* Sat Jan 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild

* Sun Oct 23 2022 Robert-André Mauchin <zebob.m@gmail.com> - 2.2.0-1
- Update to 2.2.0

* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild

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

* Sat Jan 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild

* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild

* Fri Jun 11 19:46:23 CEST 2021 Robert-André Mauchin <zebob.m@gmail.com> - 2.1.0-1
- Initial package.
- Close: rhbz#1965791

## END: Generated by rpmautospec