From 7c6678ec820dae2a17362ee679c479fe2e02a87a Mon Sep 17 00:00:00 2001 From: weiyaping Date: Tue, 19 Dec 2023 10:54:10 +0800 Subject: [PATCH] Don't count vendored code into coverage Signed-off-by: weiyaping --- ...-t-count-vendored-code-into-coverage.patch | 30 +++++++++++++++++++ python-wheel.spec | 6 +++- 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 0001-Don-t-count-vendored-code-into-coverage.patch diff --git a/0001-Don-t-count-vendored-code-into-coverage.patch b/0001-Don-t-count-vendored-code-into-coverage.patch new file mode 100644 index 0000000..0d30357 --- /dev/null +++ b/0001-Don-t-count-vendored-code-into-coverage.patch @@ -0,0 +1,30 @@ +From 7ab18e4eb9ab30f60a82fad33357be666ca26637 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Alex=20Gr=C3=B6nholm?= +Date: Wed, 18 Aug 2021 20:11:44 +0300 +Subject: [PATCH] Don't count vendored code into coverage + +--- + setup.cfg | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/setup.cfg b/setup.cfg +index 1aa2849..7f1a86f 100644 +--- a/setup.cfg ++++ b/setup.cfg +@@ -53,11 +53,12 @@ distutils.commands = + bdist_wheel = wheel.bdist_wheel:bdist_wheel + + [tool:pytest] +-addopts = --cov=wheel ++addopts = --cov --cov-config=setup.cfg + testpaths = tests + + [coverage:run] + source = wheel ++omit = */vendored/* + + [coverage:report] + show_missing = true +-- +2.42.0.windows.2 + diff --git a/python-wheel.spec b/python-wheel.spec index 0ac063c..f115e97 100644 --- a/python-wheel.spec +++ b/python-wheel.spec @@ -1,7 +1,7 @@ %bcond_with bootstrap Name: python-wheel Version: 0.37.0 -Release: 5 +Release: 6 Epoch: 1 Summary: Built-package format for Python License: MIT @@ -11,6 +11,7 @@ BuildArch: noarch Patch01: 0001-Fixed-wheel-pack-duplicating-WHEEL-contents-on-build.patch Patch02: 0001-Support-unpacking-wheels-that-contain-files-with-com.patch +Patch03: 0001-Don-t-count-vendored-code-into-coverage.patch %description A built-package format for Python. @@ -82,6 +83,9 @@ PYTHONPATH=%{buildroot}%{python3_sitelib} py.test-3 -v --ignore build %endif %changelog +* Tue Dec 19 2023 liubo - 1:0.37.0-6 +- Don't count vendored code into coverage + * Wed Nov 8 2023 liubo - 1:0.37.0-5 - Support unpacking wheels that contain files with commas in their names -- Gitee