Accepting request 1225776 from devel:languages:python

- Add no-coverage.patch eliminating coverage measurement.

- Add %{?sle15_python_module_pythons}

OBS-URL: https://build.opensuse.org/request/show/1225776
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-named?expand=0&rev=2
This commit is contained in:
2024-11-22 22:50:59 +00:00
committed by Git OBS Bridge
3 changed files with 59 additions and 1 deletions

45
no-coverage.patch Normal file
View File

@@ -0,0 +1,45 @@
---
pyproject.toml | 22 ----------------------
1 file changed, 22 deletions(-)
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -40,9 +40,7 @@ ruff = "0.3.2"
mypy = "1.9.0"
[tool.poetry.group.test.dependencies]
-coverage = "7.4.4"
pytest = "8.1.1"
-pytest-cov = "4.1.0"
[tool.poetry.group.docs]
optional = true
@@ -65,28 +63,8 @@ changelogging = "1.4.1"
line-length = 100
[tool.pytest.ini_options]
-addopts = "--cov named"
testpaths = ["tests"]
-[tool.coverage.run]
-source = ["named"]
-
-[tool.coverage.report]
-ignore_errors = true
-exclude_lines = [
- "pragma: never",
- "pragma: no cover",
- "if TYPE_CHECKING",
- "@overload",
- "@required",
- "raise NotImplementedError",
- "raise AssertionError",
- "def __repr__",
-]
-
-[tool.coverage.html]
-directory = "coverage"
-
[tool.mypy]
strict = true

View File

@@ -1,3 +1,13 @@
-------------------------------------------------------------------
Fri Nov 22 09:51:46 UTC 2024 - Matej Cepl <mcepl@cepl.eu>
- Add no-coverage.patch eliminating coverage measurement.
-------------------------------------------------------------------
Fri Nov 22 09:12:07 UTC 2024 - ecsos <ecsos@opensuse.org>
- Add %{?sle15_python_module_pythons}
-------------------------------------------------------------------
Thu Nov 14 09:15:36 UTC 2024 - Dirk Müller <dmueller@suse.com>

View File

@@ -16,6 +16,7 @@
#
%{?sle15_python_module_pythons}
Name: python-named
Version: 1.4.2
Release: 0
@@ -23,9 +24,11 @@ Summary: Named types
License: MIT
URL: https://github.com/nekitdev/named
Source: https://github.com/nekitdev/named/archive/refs/tags/v%{version}.tar.gz#/named-%{version}-gh.tar.gz
# PATCH-FEATURE-OPENSUSE no-coverage.patch mcepl@suse.com
# Don't calculate test coverage
Patch0: no-coverage.patch
BuildRequires: %{python_module pip}
BuildRequires: %{python_module poetry-core >= 1.9.0}
BuildRequires: %{python_module pytest-cov}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module typing-extensions}
BuildRequires: fdupes