[packages/python3-pytest] - updated to 7.2.1 - removed outdated tests patch
qboosh
qboosh at pld-linux.org
Sun Jan 15 19:16:59 CET 2023
commit 2ef5c0c0fa6bc6678c803cc51cc4510f4c5b8b0e
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sun Jan 15 19:18:06 2023 +0100
- updated to 7.2.1
- removed outdated tests patch
python3-pytest-tests.patch | 10 ----------
python3-pytest.spec | 48 +++++++++++++++++++++++++++++-----------------
2 files changed, 30 insertions(+), 28 deletions(-)
---
diff --git a/python3-pytest.spec b/python3-pytest.spec
index 353e6b8..5f246c0 100644
--- a/python3-pytest.spec
+++ b/python3-pytest.spec
@@ -9,25 +9,29 @@
Summary: Simple and popular testing tool for Python
Summary(pl.UTF-8): Proste i popularne narzędzie testujące dla Pythona
Name: python3-%{module}
-Version: 6.2.5
-Release: 3
+Version: 7.2.1
+Release: 1
License: MIT
Group: Development/Languages/Python
#Source0Download: https://pypi.org/simple/pytest/
Source0: https://files.pythonhosted.org/packages/source/p/pytest/pytest-%{version}.tar.gz
-# Source0-md5: 8bc467ebd5d571778dc51dd87ff09513
-Patch0: %{name}-tests.patch
+# Source0-md5: 366a4047534ef0485f700c20bb574f67
URL: https://pytest.org/
-BuildRequires: python3-devel >= 1:3.6
-BuildRequires: python3-modules >= 1:3.6
+BuildRequires: python3-devel >= 1:3.7
+BuildRequires: python3-modules >= 1:3.7
BuildRequires: python3-py >= 1.8.2
-BuildRequires: python3-setuptools >= 1:42.0
-BuildRequires: python3-setuptools_scm >= 3.4
-BuildRequires: python3-toml
+BuildRequires: python3-setuptools >= 1:45.0
+BuildRequires: python3-setuptools_scm >= 6.2.3
+%if "%{py3_ver}" != "3.11"
+BuildRequires: python3-tomli
+%endif
%if %{with tests}
BuildRequires: pydoc3 >= 1:3.6
BuildRequires: python3-argcomplete
BuildRequires: python3-attrs >= 19.2.0
+%if "%{py3_ver}" != "3.11"
+BuildRequires: python3-exceptiongroup >= 1.0.0
+%endif
BuildRequires: python3-hypothesis >= 3.56
%if "%{py3_ver}" < "3.8"
BuildRequires: python3-importlib_metadata >= 0.12
@@ -50,15 +54,20 @@ BuildRequires: rpm-pythonprov
BuildRequires: rpmbuild(macros) >= 1.714
BuildRequires: sed >= 4.0
%if %{with doc}
+BuildRequires: python3-packaging < 22
BuildRequires: python3-pallets-sphinx-themes
BuildRequires: python3-pluggy >= 1.0
-BuildRequires: python3-pygments_pytest >= 1.1.0
+BuildRequires: python3-pygments_pytest >= 2.3.0
BuildRequires: python3-sphinx_removed_in >= 0.2.0
+BuildRequires: python3-sphinxcontrib-svg2pdfconverter
BuildRequires: python3-sphinxcontrib-trio
-BuildRequires: sphinx-pdg-3 >= 3.1
-#BuildRequires: sphinx-pdg-3 < 4 (? doc/en/requirements.txt says so)
+BuildRequires: sphinx-pdg-3 >= 4.5
+# >= 5
+BuildRequires: sphinx-pdg-3 < 6
%endif
-Requires: python3-modules >= 1:3.6
+Requires: python3-modules >= 1:3.7
+# no egg dependency (pytest comes with minimal replacement, we don't package it)
+Requires: python3-py >= 1.11.0
Requires: python3-setuptools >= 1:42.0
Obsoletes: python3-pytest-cache < 1.1
Obsoletes: python3-pytest-catchlog < 1.2.3
@@ -85,19 +94,18 @@ Dokumentacja pakietu Pythona py.test.
%prep
%setup -q -n %{module}-%{version}
-%patch0 -p1
%build
export PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
%py3_build
%if %{with tests}
-# test_pdb_custom_cls_with_settrace fails without preinstalled pytest
-# test_pdb_* which spawn pdb hang under some unclear conditions
-# ...and most test_debugging tests require ptys
+# test_trial_pdb and most test_debugging tests require ptys
# test_spawn_uses_tmphome and some terminal tests require ptys
+# test_code_highlight and test_color_yes has some terminal sequence mismatch
+# test_version_* have some exception string mismatch
PYTHONPATH=$(pwd)/src \
-%{__python3} -m pytest -k 'not (test_debugging or test_spawn_uses_tmphome or test_runtest_location_shown_before_test_starts or test_report_collect_after_half_a_second or test_trial_pdb)' testing
+%{__python3} -m pytest -k 'not (test_code_highlight or test_color_yes or test_debugging or test_header_trailer_info or test_spawn_uses_tmphome or test_runtest_location_shown_before_test_starts or test_report_collect_after_half_a_second or test_trial_pdb or test_version_less_verbose or test_version_verbose)' testing
%endif
%if %{with doc}
@@ -119,6 +127,10 @@ rm -rf $RPM_BUILD_ROOT
ln -sf py.test-3 $RPM_BUILD_ROOT%{_bindir}/py.test
ln -sf pytest-3 $RPM_BUILD_ROOT%{_bindir}/pytest
+# rely on system python3-py instead
+%{__rm} $RPM_BUILD_ROOT%{py3_sitescriptdir}/py.py \
+ $RPM_BUILD_ROOT%{py3_sitescriptdir}/__pycache__/py.*.py[co]
+
%clean
rm -rf $RPM_BUILD_ROOT
diff --git a/python3-pytest-tests.patch b/python3-pytest-tests.patch
deleted file mode 100644
index 1f97228..0000000
--- a/python3-pytest-tests.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- pytest-6.2.2/testing/acceptance_test.py~ 2021-01-25 15:51:22.000000000 +0100
-+++ pytest-6.2.2/testing/acceptance_test.py 2021-02-28 15:25:46.086814937 +0100
-@@ -142,6 +142,7 @@ class TestGeneralUsage:
- return (DummyDist(entry_points),)
-
- monkeypatch.setattr(importlib_metadata, "distributions", my_dists)
-+ monkeypatch.delenv("PYTEST_DISABLE_PLUGIN_AUTOLOAD", raising=False)
- params = ("-p", "mycov") if load_cov_early else ()
- pytester.runpytest_inprocess(*params)
- if load_cov_early:
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python3-pytest.git/commitdiff/2ef5c0c0fa6bc6678c803cc51cc4510f4c5b8b0e
More information about the pld-cvs-commit
mailing list