- Add support for Python 3.13.
- Drop support for Python 3.8 version.
- Add a GitHub workflow that parses all of Fedora's spec files. The workflow runs on each PR.
- The
replace_macro
function gained a newmax_attempts
parameter that prevents endless recursion in certain scenarios. Thanks @kraptor. - Add support for Python 3.12.
- Drop support for Python 3.7. It is EOL and no longer supported by the Python core team.
- Fix replace_macro's behavior with user-defined conditional macros (PR #56). Thanks @imphil.
- The parsing of package names was wrong when tab characters where used in %package (#57). This has been fixed by @tagoh.
- Implement parsing of spec files where sub-packages (
%package
) have their own sources and patches defined. Previously, the parser would just fail with an error message likeAttributeError: 'Package' object has no attribute 'sources'
. This is now fixed. - Use SemVer for versioning. git tags are now prefixed with
v
, e.g.v0.15.0
instead of0.15.0
.
- Teach replace_macro how to deal with macros that are not wrapped in curly braces (PR #54).
- Add type annotations for tools like mypy, your IDE, and your brain (PR #55).
- Fix parsing of BuildRequires:, Requires:, Conflicts:, Obsoletes:, Provides: with comments at end of line. Thanks @SuoXC.
- Add CI for Python 3.11.
Changes:
- Add type annotations for tools like mypy, your IDE, and your brain. Thanks @KOLANICH.
replace_macros()
function now always expects a Spec instance as second argument. Does not make much sense without.- Add support for parsing %description and %changelog (see PR #42). Thanks @BrunoVernay.
- Add support for ExcludeArch and ExclusiveArch (#45). Thanks @tonsh.
- Add
warnings_enabled
knob to issue warnings of typeUserWarning
during spec file parsing.
Changes:
- Ignore spaces before ':' separator (see PR #32)
- Fix behavior of replace_macro function when macro is a tag, too (see issue #33).
Changes:
- Ignore case when parsing directives
New Features:
- Enable parsing versions in
BuildRequires:
andRequires:
- Add support for conditional macros, e.g.
%{?test_macro:expression}
- Use flit for packaging
New Features:
- Add
Spec.sources_dict
andSpec.patches_dict