14
0

Accepting request 1043093 from home:david.anes:branches:devel:languages:python

- Add config.cfg improvements to remove deprecation warnings
  * python-specfile-improve-setup-cfg.patch
- Update to version 0.11.1
  * Tags enclosed in conditional macro expansions are not ignored 
    anymore.
  * Fixed context managers being shared between Specfile instances. 1q
- Update to version 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.

OBS-URL: https://build.opensuse.org/request/show/1043093
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-specfile?expand=0&rev=7
This commit is contained in:
2022-12-15 10:33:46 +00:00
committed by Git OBS Bridge
parent ec1765db00
commit 647460f018
5 changed files with 52 additions and 8 deletions

View File

@@ -18,7 +18,7 @@
%define skip_python38 1
Name: python-specfile
Version: 0.10.0
Version: 0.11.1
Release: 0
Summary: A library for parsing and manipulating RPM spec files
License: MIT
@@ -38,7 +38,12 @@ BuildRequires: fdupes
Requires: python-rpm
Requires: python-typing-extensions
# PATCH-SUSE: some improvements that are still pending upstream
# https://github.com/packit/specfile/pull/162
Patch0: python-specfile-improve-setup-cfg.patch
BuildArch: noarch
%python_subpackages
%description
@@ -46,19 +51,22 @@ A library for parsing and manipulating RPM spec files.
%prep
%autosetup -p1 -n specfile-%{version}
# we use our own package for "rpm" module (see Requires)
sed -i '/rpm-py-installer/d' setup.cfg
%build
%python_build
%check
# Following tests fail:
# * test_update_tag
# * test_macros_reinit
%pytest -k "not (test_update_tag or test_macros_reinit)"
%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
# test_macros_reinit fails
%pytest -k 'not test_macros_reinit'
%files %{python_files}
%doc CHANGELOG.md README.md
%license LICENSE