Compare commits
2 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
| 1825b851f3 | |||
| a7f3aaa4ee |
@@ -1,3 +1,11 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Mar 31 01:59:41 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
|
||||||
|
|
||||||
|
- Add patch support-coverage-7.7.patch:
|
||||||
|
* Support Coverage 7.7.0 and above changes with plugins.
|
||||||
|
- Switch to autosetup and pyproject macros.
|
||||||
|
- No more greedy globs in %files.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sun Jun 11 08:31:24 UTC 2023 - ecsos <ecsos@opensuse.org>
|
Sun Jun 11 08:31:24 UTC 2023 - ecsos <ecsos@opensuse.org>
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-covdefaults
|
# spec file for package python-covdefaults
|
||||||
#
|
#
|
||||||
# Copyright (c) 2023 SUSE LLC
|
# Copyright (c) 2025 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@@ -22,10 +22,12 @@ Version: 2.3.0
|
|||||||
Release: 0
|
Release: 0
|
||||||
Summary: Python coverage plugin to provide default settings
|
Summary: Python coverage plugin to provide default settings
|
||||||
License: MIT
|
License: MIT
|
||||||
Group: Development/Languages/Python
|
|
||||||
URL: https://github.com/asottile/covdefaults
|
URL: https://github.com/asottile/covdefaults
|
||||||
Source: https://github.com/asottile/covdefaults/archive/v%{version}.tar.gz#/covdefaults-%{version}.tar.gz
|
Source: https://github.com/asottile/covdefaults/archive/v%{version}.tar.gz#/covdefaults-%{version}.tar.gz
|
||||||
|
# PATCH-FIX-UPSTREAM gh#asottile/covdefaults#164
|
||||||
|
Patch0: support-coverage-7.7.patch
|
||||||
BuildRequires: %{python_module coverage}
|
BuildRequires: %{python_module coverage}
|
||||||
|
BuildRequires: %{python_module pip}
|
||||||
BuildRequires: %{python_module pytest}
|
BuildRequires: %{python_module pytest}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
@@ -38,13 +40,13 @@ BuildArch: noarch
|
|||||||
Python coverage plugin to provide default settings.
|
Python coverage plugin to provide default settings.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n covdefaults-%{version}
|
%autosetup -p1 -n covdefaults-%{version}
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%python_build
|
%pyproject_wheel
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%python_install
|
%pyproject_install
|
||||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
|
|
||||||
%check
|
%check
|
||||||
@@ -53,6 +55,8 @@ Python coverage plugin to provide default settings.
|
|||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
%doc README.md
|
%doc README.md
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%{python_sitelib}/*
|
%{python_sitelib}/covdefaults.py
|
||||||
|
%pycache_only %{python_sitelib}/__pycache__/covdefaults.*.pyc
|
||||||
|
%{python_sitelib}/covdefaults-%{version}.dist-info
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
|||||||
32
support-coverage-7.7.patch
Normal file
32
support-coverage-7.7.patch
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
From 5f8217506f8425d793b04d6379971c7c6245d9e5 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Steve Kowalik <steven@wedontsleep.org>
|
||||||
|
Date: Mon, 31 Mar 2025 12:40:43 +1100
|
||||||
|
Subject: [PATCH] Support Coverage 7.7.0 and above
|
||||||
|
|
||||||
|
Coverage 7.7.0 refactored the way the Plugins class is used, and as a
|
||||||
|
consequence, the load_plugins method was renamed, and is no longer a
|
||||||
|
class method. Check if the new method exists, and fall back to the older
|
||||||
|
method otherwise.
|
||||||
|
---
|
||||||
|
tests/covdefaults_test.py | 8 +++++++-
|
||||||
|
1 file changed, 7 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/tests/covdefaults_test.py b/tests/covdefaults_test.py
|
||||||
|
index 2bf41c2..9f3f129 100644
|
||||||
|
--- a/tests/covdefaults_test.py
|
||||||
|
+++ b/tests/covdefaults_test.py
|
||||||
|
@@ -228,7 +228,13 @@ def test_configure_keeps_existing_fail_under():
|
||||||
|
|
||||||
|
def test_coverage_init():
|
||||||
|
cfg = CoverageConfig()
|
||||||
|
- plugin_manager = Plugins.load_plugins(['covdefaults'], cfg)
|
||||||
|
+ # Coverage 7.7.0 and above
|
||||||
|
+ if hasattr(Plugins, 'load_from_config'):
|
||||||
|
+ plugin_manager = Plugins()
|
||||||
|
+ plugin_manager.load_from_config(['covdefaults'], cfg)
|
||||||
|
+ # Coverage 7.6.12 and below
|
||||||
|
+ else: # pragma: no cover
|
||||||
|
+ plugin_manager = Plugins.load_plugins(['covdefaults'], cfg)
|
||||||
|
assert plugin_manager.get('covdefaults.CovDefaults')
|
||||||
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user