Blame python-specfile.spec

Packit dcfa709
%if 0%{?rhel} == 9
Packit dcfa709
# RHEL 9 is missing python-flexmock
Packit dcfa709
%bcond_with tests
Packit dcfa709
%else
Packit dcfa709
%bcond_without tests
Packit dcfa709
%endif
Packit dcfa709
Packit dcfa709
0dd597c
%global desc %{expand:
0dd597c
Python library for parsing and manipulating RPM spec files.
0dd597c
Main focus is on modifying existing spec files, any change should result
0dd597c
in a minimal diff.}
0dd597c
0dd597c
0dd597c
Name:           python-specfile
Packit 364ead1
Version:        0.15.0
Packit 53f3d3b
Release:        1%{?dist}
0dd597c
0dd597c
Summary:        A library for parsing and manipulating RPM spec files
0dd597c
License:        MIT
0dd597c
URL:            https://github.com/packit/specfile
0dd597c
Packit 39331bd
Source0:        %{pypi_source specfile}
0dd597c
0dd597c
BuildArch:      noarch
0dd597c
0dd597c
BuildRequires:  python%{python3_pkgversion}-devel
0dd597c
0dd597c
0dd597c
%description
0dd597c
%{desc}
0dd597c
0dd597c
0dd597c
%package -n python%{python3_pkgversion}-specfile
0dd597c
Summary:        %{summary}
0dd597c
0dd597c
0dd597c
%description -n python%{python3_pkgversion}-specfile
0dd597c
%{desc}
0dd597c
0dd597c
0dd597c
%prep
0dd597c
%autosetup -p1 -n specfile-%{version}
Packit b781189
Packit b781189
Packit b781189
%generate_buildrequires
Packit dcfa709
%pyproject_buildrequires %{?with_tests: -x testing}
0dd597c
0dd597c
0dd597c
%build
0dd597c
%pyproject_wheel
0dd597c
0dd597c
0dd597c
%install
0dd597c
%pyproject_install
0dd597c
%pyproject_save_files specfile
0dd597c
0dd597c
Packit 31c6d77
%if %{with tests}
0dd597c
%check
0dd597c
%pytest
Packit dcfa709
%endif
0dd597c
0dd597c
0dd597c
%files -n python%{python3_pkgversion}-specfile -f %{pyproject_files}
0dd597c
%doc README.md
0dd597c
0dd597c
0dd597c
%changelog
Packit 364ead1
* Fri Mar 10 2023 Packit <hello@packit.dev> - 0.15.0-1
Packit 364ead1
- Parsing the spec file by RPM is now performed only if really necessary, greatly improving performance in certain scenarios. (#212)
Packit 364ead1
- Checked that license is a valid SPDX license.
Packit 364ead1
Packit a6509ff
* Thu Feb 23 2023 Packit <hello@packit.dev> - 0.14.0-1
Packit a6509ff
- Fixed a bug that broke parsing in case spec file contained conditionalized macro definitions or similar constructs. (#209)
Packit a6509ff
- Specfile no longer depends on rpm-py-installer, it now depends directly on rpm. (#207)
Packit a6509ff
Packit 94f0c7b
* Mon Jan 30 2023 Packit <hello@packit.dev> - 0.13.2-1
Packit 94f0c7b
- Fixed infinite loop that occured when section options were followed by whitespace. (#197)
Packit 94f0c7b
Packit 53f3d3b
* Mon Jan 23 2023 Packit <hello@packit.dev> - 0.13.1-1
Packit 53f3d3b
- Fixed a bug in section parsing that caused sections to be ignored when there were macro definitions spread across the spec file and not cumulated at the top. (#191)
Packit 53f3d3b
7472dab
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.13.0-2
7472dab
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
7472dab
Packit 1070443
* Fri Jan 20 2023 Packit <hello@packit.dev> - 0.13.0-1
Packit 1070443
- Added `Section.options` attribute for convenient manipulation of section options. (#183)
Packit 1070443
- specfile now supports single-line sections where section content is represented by a macro starting with a newline. (#182)
Packit 1070443
- Added `evr` argument to `Specfile.add_changelog_entry()`. This allows adding a changelog entry with an EVR value that's different from the current specfile's value. This makes it easier to reconstruct a specfile's `%changelog` based on another source using the higher level interface. (#181)
Packit 1070443
Packit ec692d6
* Fri Jan 06 2023 Packit <hello@packit.dev> - 0.12.0-1
Packit 1070443
- All classes including `Specfile` itself can now be copied using the standard `copy()` and `deepcopy()` functions from `copy` module. (#176)
Packit 1070443
- `Section.name` attribute has been renamed to a more fitting `Section.id`. (#167)
Packit ec692d6
- `setup.cfg` now uses `license_files` instead of deprecated `license_file`. (#162)
Packit ec692d6
Packit ed6ad83
* Wed Dec 14 2022 Packit <hello@packit.dev> - 0.11.1-1
Packit ec692d6
- Tags enclosed in conditional macro expansions are not ignored anymore. (#156)
Packit ed6ad83
- Fixed context managers being shared between Specfile instances. (#157)
Packit ed6ad83
Packit 0070694
* Fri Dec 09 2022 Packit <hello@packit.dev> - 0.11.0-1
Packit 0070694
- Context managers (`Specfile.sections()`, `Specfile.tags()` etc.) can now be nested and combined together (with one exception - `Specfile.macro_definitions()`), and it is also possible to use tag properties (e.g. `Specfile.version`, `Specfile.license`) inside them. It is also possible to access the data directly, avoiding the `with` statement, by using the `content` property (e.g. `Specfile.tags().content`), but be aware that no modifications done to such data will be preserved. You must use `with` to make changes. (#153)
Packit 0070694
Packit 31c6d77
* Wed Nov 30 2022 Packit <hello@packit.dev> - 0.10.0-1
Packit 0070694
- Fixed an issue that caused empty lines originally inside changelog entries to appear at the end. (#140)
Packit 31c6d77
- Renamed the `ignore_missing_includes` option to a more general `force_parse`. If specified, it allows to attempt to parse the spec file even if one or more sources required to be present at parsing time are not available. Such sources include sources referenced from shell expansions in tag values and sources included using the `%include` directive. (#137)
Packit 31c6d77
Packit b56ae30
* Sat Nov 12 2022 Packit <hello@packit.dev> - 0.9.1-1
Packit 31c6d77
- `specfile` now supports localized tags (e.g. `Summary(fr)`) and tags with qualifiers (e.g. `Requires(post)`).
Packit b56ae30
  It also follows more closely rpm parsing logic and doesn't fail on invalid section names. (#132)
Packit b56ae30
Packit 8f2a067
* Tue Oct 25 2022 Packit <hello@packit.dev> - 0.9.0-1
Packit b56ae30
- Added utility classes for working with (N)EVR. (#113)
Packit 8f2a067
- Fixed an issue with multiple instances of `Specfile` not expanding macros in the right context. (#117)
Packit 8f2a067
Packit e502c07
* Fri Oct 14 2022 Packit <hello@packit.dev> - 0.8.0-1
Packit e502c07
- 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)
Packit e502c07
Packit dcfa709
* Fri Oct 07 2022 Packit <hello@packit.dev> - 0.7.0-1
Packit e502c07
- It is now possible to filter changelog entries by specifying lower bound EVR, upper bound EVR or both. (#104)
Packit dcfa709
- Added support for filenames specified in source URL fragments, for example: `https://example.com/foo/1.0/download.cgi#/%{name}-%{version}.tar.gz` (#100)
Packit dcfa709
Packit 9a1bd64
* Thu Aug 25 2022 Packit <hello@packit.dev> - 0.6.0-1
Packit dcfa709
- Switched to our own implementation of working with `%changelog` timestamps and removed dependency on arrow (#88)
Packit 9a1bd64
- Fixed requires of EPEL 8 rpm (#86)
Packit 9a1bd64
Packit b781189
* Wed Aug 10 2022 Packit <hello@packit.dev> - 0.5.1-1
Packit 9a1bd64
- Added new `%conf` section (#74)
Packit 9a1bd64
- Switched to rpm-py-installer (#75)
Packit b781189
- Fixed detecting extended timestamp format in `%changelog` (#77, #81)
Packit b781189
Packit f15f6e3
* Fri Jul 22 2022 Packit <hello@packit.dev> - 0.5.0-1
Packit f15f6e3
- Strict optional typing is now enforced (#68)
Packit f15f6e3
- Fixed deduplication of tag names (#69)
Packit f15f6e3
- Sources and patches can now be removed by number (#69)
Packit f15f6e3
- Number of digits in a source number is now expressed the same way as packit does it (#69)
Packit f15f6e3
- Empty lines are now compressed when deleting tags (#69)
Packit f15f6e3
- Added convenience property for getting texts of tag comments (#69)
Packit f15f6e3
- Added convenience method for adding a patch (#69)
Packit f15f6e3
Packit 3d61f65
* Tue Jun 21 2022 Packit <hello@packit.dev> - 0.4.0-1
Packit 3d61f65
- Added convenience properties for most used tags (#63)
Packit 3d61f65
- Hardened linting by ignoring only specific mypy errors (#64)
Packit 3d61f65
- Fixed list of valid tag names and ensured newly added tags are not part of a condition block (#66)
Packit 3d61f65
- Initial patch number and its default number of digits are now honored (#66)
Packit 3d61f65
- Fixed a bug in `%prep` macro stringification (#67)
Packit 3d61f65
a252ae5
* Mon Jun 20 2022 Python Maint <python-maint@redhat.com> - 0.3.0-2
a252ae5
- Rebuilt for Python 3.11
a252ae5
Packit 0c7f08a
* Mon May 16 2022 Packit <hello@packit.dev> - 0.3.0-1
Packit 0c7f08a
- Made `Sources` a `MutableSequence` (#36)
Packit 0c7f08a
- Started using consistent terminology for source numbers and added the option to insert a source with a specific number (#47)
Packit 0c7f08a
- Added support for implicit source numbering (#48)
Packit 0c7f08a
- Documented sources and `%prep` macros in README (#49)
Packit 0c7f08a
- Implemented high-level manipulation of version and release (#54)
Packit 0c7f08a
- Added support for `* Mon May 16 2022 John Doe <packager@example.com> - 0.3.0-1.fc35
Packit 0c7f08a
- local build` (#56)
Packit 0c7f08a
- Added `remote` property to sources and enabled addition of `Sources` (#59)
Packit 0c7f08a
- Implemented mid-level manipulation of `%prep` section, including modification of `%prep` macros (#37, #52)
Packit 0c7f08a
Packit 0c7f08a
Packit 39331bd
* Thu Mar 31 2022 Packit <hello@packit.dev> - 0.2.0-1
Packit 39331bd
- Enabled Zuul CI (#8)
Packit 39331bd
- Switched from git:// to https:// for rebase hook (#22)
Packit 39331bd
- Updated pre-commit configuration and adapted to type changes brought by new version of mypy (#24)
Packit 39331bd
- Non-lowercase section names are now supported (#26)
Packit 39331bd
- Added `Sections.get()` convenience method (#29)
Packit 39331bd
- Added packit configuration and enabled packit (#25)
Packit 39331bd
- Fixed infinite recursion when deep-copying instances of `Sections` and `Tags` (#30)
Packit 39331bd
- Updated Fedora and EPEL spec files (#32)
Packit 39331bd
- Fixed issues caused by older versions of dependencies on EPEL 8 (#33)
Packit 39331bd
- Implemented high-level manipulation of sources and patches (#20, #36)
Packit 39331bd
- It is now possible to parse spec files with missing local sources (#23)
Packit 39331bd
0dd597c
* Mon Feb 21 2022 Nikola Forró <nforro@redhat.com> - 0.1.1-1
0dd597c
- New upstream release 0.1.1
0dd597c
0dd597c
* Tue Feb 08 2022 Nikola Forró <nforro@redhat.com> - 0.1.0-1
0dd597c
- Initial package