Specfile

Latest version: v0.34.2

Safety actively analyzes 723144 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 8 of 10

0.11.1

- Tags enclosed in conditional macro expansions are not ignored anymore. (156)
- Fixed context managers being shared between Specfile instances. (157)

0.11.0

- 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)

0.10.0

- Fixed an issue that caused empty lines originally inside changelog entries to appear at the end. (140)
- 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)

0.9.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)

0.9.0

- 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)

0.8.0

- 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)

Page 8 of 10

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.