## START: Set by rpmautospec
## (rpmautospec version 0.3.0)
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
    release_number = 3;
    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:           pyp2spec
Version:        0.6.1
Release:        %autorelease
Summary:        Generate Fedora RPM spec files for Python projects

# Code is MIT, templates and files generated by the tool MIT-0
License:        MIT and MIT-0
URL:            https://github.com/befeleme/pyp2spec
Source0:        %{pypi_source pyp2spec}

BuildArch:      noarch
BuildRequires:  python3-devel


%description
pyp2spec is a tech preview. It is a tool generating Fedora RPM spec files
for Python distributions. It utilizes the benefits of pyproject-rpm-macros.


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


%generate_buildrequires
%pyproject_buildrequires -x test


%build
%pyproject_wheel


%install
%pyproject_install
%pyproject_save_files pyp2spec


%check
%pytest


%files -f %{pyproject_files}
%doc README.md
%{_bindir}/pyp2spec
%{_bindir}/conf2spec
%{_bindir}/pyp2conf


%changelog
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> 0.6.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild

* Mon Aug 01 2022 Karolina Surma <ksurma@redhat.com> 0.6.1-1
- Update to 0.6.1

* Mon Aug 01 2022 Karolina Surma <ksurma@redhat.com> 0.6.0-1
- Update to 0.6.0

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

* Tue Jun 21 2022 Karolina Surma <ksurma@redhat.com> 0.5.0-1
- Initial import