112 lines
3 KiB
RPMSpec
112 lines
3 KiB
RPMSpec
%if 0%{?rhel} == 9
|
|
# RHEL 9 is missing python-flexmock
|
|
%bcond_with tests
|
|
%else
|
|
%bcond_without tests
|
|
%endif
|
|
|
|
|
|
%global desc %{expand:
|
|
Python library for parsing and manipulating RPM spec files.
|
|
Main focus is on modifying existing spec files, any change should result
|
|
in a minimal diff.}
|
|
|
|
|
|
Name: python-specfile
|
|
Version: 0.9.1
|
|
Release: 1%{?dist}
|
|
|
|
Summary: A library for parsing and manipulating RPM spec files
|
|
License: MIT
|
|
URL: https://github.com/packit/specfile
|
|
|
|
Source0: %{pypi_source specfile}
|
|
|
|
BuildArch: noarch
|
|
|
|
BuildRequires: python%{python3_pkgversion}-devel
|
|
|
|
|
|
%description
|
|
%{desc}
|
|
|
|
|
|
%package -n python%{python3_pkgversion}-specfile
|
|
Summary: %{summary}
|
|
|
|
|
|
%description -n python%{python3_pkgversion}-specfile
|
|
%{desc}
|
|
|
|
|
|
%prep
|
|
%autosetup -p1 -n specfile-%{version}
|
|
# Use packaged RPM python bindings downstream
|
|
sed -i 's/rpm-py-installer/rpm/' setup.cfg
|
|
|
|
|
|
%generate_buildrequires
|
|
%pyproject_buildrequires %{?with_tests: -x testing}
|
|
|
|
|
|
%build
|
|
%pyproject_wheel
|
|
|
|
|
|
%install
|
|
%pyproject_install
|
|
%pyproject_save_files specfile
|
|
|
|
|
|
%if 0%{?with_tests}
|
|
%check
|
|
%pytest
|
|
%endif
|
|
|
|
|
|
%files -n python%{python3_pkgversion}-specfile -f %{pyproject_files}
|
|
%doc README.md
|
|
|
|
|
|
%changelog
|
|
* Sat Nov 12 2022 Packit <hello@packit.dev> - 0.9.1-1
|
|
- `specfile` now supports localized tags (e.g. `Summary(fr)`) and tags with qualifiers (e.g. `Requires(post)`).
|
|
It also follows more closely rpm parsing logic and doesn't fail on invalid section names. (#132)
|
|
|
|
* Tue Oct 25 2022 Packit <hello@packit.dev> - 0.9.0-1
|
|
- Added utility classes for working with (N)EVR. (#113)
|
|
- Fixed an issue with multiple instances of `Specfile` not expanding macros in the right context. (#117)
|
|
|
|
* Mon Oct 17 2022 Tomas Tomecek <ttomecek@redhat.com> - 0.8.0-2
|
|
- Rebuild to trigger downstream Packit automation
|
|
|
|
* Fri Oct 14 2022 Packit <hello@packit.dev> - 0.8.0-1
|
|
- Added `Specfile.update_tag()` method that allows updating tag values while trying to preserve macro expansions. You can watch a demo on [YouTube](https://youtu.be/yzMfBPdFXZY). (#101)
|
|
|
|
* Fri Oct 07 2022 Packit <hello@packit.dev> - 0.7.0-1
|
|
- It is now possible to filter changelog entries by specifying lower bound EVR, upper bound EVR or both. (#104)
|
|
- Added support for filenames specified in source URL fragments, for example: `https://example.com/foo/1.0/download.cgi#/%{name}-%{version}.tar.gz` (#100)
|
|
|
|
* Thu Aug 25 2022 Nikola Forró <nforro@redhat.com> - 0.6.0-1
|
|
- New upstream release 0.6.0
|
|
|
|
* Tue Aug 09 2022 Nikola Forró <nforro@redhat.com> - 0.5.1-1
|
|
- New upstream release 0.5.1
|
|
|
|
* Thu Jul 21 2022 Nikola Forró <nforro@redhat.com> - 0.5.0-1
|
|
- New upstream release 0.5.0
|
|
|
|
* Thu Jun 16 2022 Nikola Forró <nforro@redhat.com> - 0.4.0-1
|
|
- New upstream release 0.4.0
|
|
|
|
* Tue May 10 2022 Nikola Forró <nforro@redhat.com> - 0.3.0-1
|
|
- New upstream release 0.3.0
|
|
|
|
* Wed Mar 30 2022 Nikola Forró <nforro@redhat.com> - 0.2.0-1
|
|
- New upstream release 0.2.0
|
|
|
|
* Mon Feb 21 2022 Nikola Forró <nforro@redhat.com> - 0.1.1-1
|
|
- New upstream release 0.1.1
|
|
|
|
* Tue Feb 08 2022 Nikola Forró <nforro@redhat.com> - 0.1.0-1
|
|
- Initial package
|