[packages/python3-pytest: 3/3] - python-pytest.spec (PYTEST_4 branch) updated to 5.4.3 for python 3.5+ - updated tests patch

qboosh qboosh at pld-linux.org
Sat Sep 19 17:05:32 CEST 2020


commit fe60a6481f26728b127ac82040491ba74339ab20
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sat Sep 19 17:08:12 2020 +0200

    - python-pytest.spec (PYTEST_4 branch) updated to 5.4.3 for python 3.5+
    - updated tests patch

 python-pytest-tests.patch                 |  22 ------
 python3-pytest-tests.patch                |  10 +++
 python-pytest.spec => python3-pytest.spec | 115 ++++--------------------------
 3 files changed, 25 insertions(+), 122 deletions(-)
---
diff --git a/python-pytest.spec b/python3-pytest.spec
similarity index 55%
rename from python-pytest.spec
rename to python3-pytest.spec
index 4026279..6264f82 100644
--- a/python-pytest.spec
+++ b/python3-pytest.spec
@@ -9,57 +9,23 @@
 %define 	module	pytest
 Summary:	Simple and popular testing tool for Python
 Summary(pl.UTF-8):	Proste i popularne narzędzie testujące dla Pythona
-Name:		python-%{module}
-Version:	4.6.11
+Name:		python3-%{module}
+Version:	5.4.3
 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:	26cf20887076ad8a7beccfb5e9c44d04
+# Source0-md5:	4b6b06b2818516c7c400d4cafe3b9257
 Patch0:		%{name}-tests.patch
 URL:		https://pytest.org/
-%if %{with python2}
-BuildRequires:	python-devel >= 1:2.7
-BuildRequires:	python-modules >= 1:2.7
-BuildRequires:	python-py >= %{pylib_version}
-BuildRequires:	python-setuptools >= 1:40.0
-BuildRequires:	python-setuptools_scm
-%if %{with tests}
-BuildRequires:	pydoc >= 1:2.7
-BuildRequires:	python-argcomplete
-BuildRequires:	python-atomicwrites >= 1.0
-BuildRequires:	python-attrs >= 17.4.0
-BuildRequires:	python-funcsigs >= 1.0
-BuildRequires:	python-hypothesis >= 3.56
-BuildRequires:	python-importlib_metadata >= 0.12
-BuildRequires:	python-mock
-BuildRequires:	python-more_itertools >= 4.0.0
-BuildRequires:	python-more_itertools < 6.0.0
-BuildRequires:	python-nose
-BuildRequires:	python-packaging
-BuildRequires:	python-pathlib2 >= 2.2.0
-BuildRequires:	python-pluggy >= 0.12
-BuildRequires:	python-pluggy < 1.0
-BuildRequires:	python-requests
-BuildRequires:	python-six >= 1.10.0
-BuildRequires:	python-wcwidth
-BuildConflicts:	python-backports.unittest_mock
-BuildConflicts:	python-pytest-benchmark < 3.2.1
-# outdated
-BuildConflicts:	python-pytest-catchlog
-# with xdist requires various modules source and breaks other things
-BuildConflicts:	python-pytest-xdist
-%endif
-%endif
-%if %{with python3}
-BuildRequires:	python3-devel >= 1:3.4
-BuildRequires:	python3-modules >= 1:3.4
+BuildRequires:	python3-devel >= 1:3.5
+BuildRequires:	python3-modules >= 1:3.5
 BuildRequires:	python3-py >= %{pylib_version}
 BuildRequires:	python3-setuptools >= 1:40.0
 BuildRequires:	python3-setuptools_scm
 %if %{with tests}
-BuildRequires:	pydoc3 >= 1:3.4
+BuildRequires:	pydoc3 >= 1:3.5
 BuildRequires:	python3-argcomplete
 BuildRequires:	python3-atomicwrites >= 1.0
 BuildRequires:	python3-attrs >= 17.4.0
@@ -78,13 +44,13 @@ BuildRequires:	python3-pluggy < 1.0
 BuildRequires:	python3-requests
 BuildRequires:	python3-six >= 1.10.0
 BuildRequires:	python3-wcwidth
+BuildRequires:	python3-xmlschema
 BuildConflicts:	python3-pytest-benchmark < 3.2.1
 # outdated
 BuildConflicts:	python3-pytest-catchlog
 # seems to break things
 BuildConflicts:	python3-pytest-xdist
 %endif
-%endif
 BuildRequires:	rpm-pythonprov
 BuildRequires:	rpmbuild(macros) >= 1.714
 BuildRequires:	sed >= 4.0
@@ -94,10 +60,10 @@ BuildRequires:	python3-sphinx_removed_in >= 0.2.0
 BuildRequires:	python3-sphinxcontrib-trio
 BuildRequires:	sphinx-pdg-3 >= 1.8.2
 %endif
-Requires:	python-modules >= 1:2.7
-Requires:	python-setuptools
-Obsoletes:	python-pytest-cache
-Obsoletes:	python-pytest-catchlog
+Requires:	python3-modules >= 1:3.5
+Requires:	python3-setuptools
+Obsoletes:	python3-pytest-cache
+Obsoletes:	python3-pytest-catchlog
 BuildArch:	noarch
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -107,22 +73,6 @@ py.test is a simple and popular testing tool for Python.
 %description -l pl.UTF-8
 py.test to proste i popularne narzędzie testujące dla Pythona.
 
-%package -n python3-pytest
-Summary:	Simple powerful testing with Python
-Summary(pl.UTF-8):	Proste, ale funkcjonalne narzędzie testujące dla Pythona
-Group:		Development/Languages
-Requires:	python3-devel-tools >= 1:3.4
-Requires:	python3-setuptools
-Obsoletes:	python3-pytest-cache
-Obsoletes:	python3-pytest-catchlog
-
-%description -n python3-pytest
-py.test provides simple, yet powerful testing for Python.
-
-%description -n python3-pytest -l pl.UTF-8
-py.test to proste, ale bardzo funkcjonalne narzędzie testujące dla
-Pythona.
-
 %package apidocs
 Summary:	Documentation for py.test Pythona package
 Summary(pl.UTF-8):	Dokumentacja pakietu Pythona py.test
@@ -140,17 +90,6 @@ Dokumentacja pakietu Pythona py.test.
 
 %build
 export PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
-%if %{with python2}
-%py_build
-
-%if %{with tests}
-# test_pdb_custom_cls_with_settrace fails without preinstalled pytest
-PYTHONPATH=$(pwd)/src \
-%{__python} -m pytest -k 'not test_pdb' testing
-%endif
-%endif
-
-%if %{with python3}
 %py3_build
 
 %if %{with tests}
@@ -159,7 +98,6 @@ PYTHONPATH=$(pwd)/src \
 PYTHONPATH=$(pwd)/src \
 %{__python3} -m pytest -k 'not test_pdb' testing
 %endif
-%endif
 
 %if %{with doc}
 for l in doc/*; do
@@ -172,50 +110,27 @@ done
 %install
 rm -rf $RPM_BUILD_ROOT
 
-%if %{with python3}
 %py3_install
 
 %{__mv} $RPM_BUILD_ROOT%{_bindir}/py.test{,-3}
 %{__mv} $RPM_BUILD_ROOT%{_bindir}/pytest{,-3}
-%endif
-
-%if %{with python2}
-%py_install
-
-ln $RPM_BUILD_ROOT%{_bindir}/py.test{,-2}
-ln $RPM_BUILD_ROOT%{_bindir}/pytest{,-2}
 
-# pytest.py source seems required for "monkeypatching" tests
-%py_postclean -x pytest.py
-%endif
+ln -sf py.test-3 $RPM_BUILD_ROOT%{_bindir}/py.test
+ln -sf pytest-3 $RPM_BUILD_ROOT%{_bindir}/pytest
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%if %{with python2}
 %files
 %defattr(644,root,root,755)
 %doc AUTHORS CHANGELOG.rst LICENSE README.rst
 %attr(755,root,root) %{_bindir}/py.test
-%attr(755,root,root) %{_bindir}/py.test-2
-%attr(755,root,root) %{_bindir}/pytest
-%attr(755,root,root) %{_bindir}/pytest-2
-%{py_sitescriptdir}/pytest.py*
-%{py_sitescriptdir}/_pytest
-%{py_sitescriptdir}/pytest-%{version}-py*.egg-info
-%endif
-
-%if %{with python3}
-%files -n python3-pytest
-%defattr(644,root,root,755)
-%doc AUTHORS CHANGELOG.rst LICENSE README.rst
 %attr(755,root,root) %{_bindir}/py.test-3
+%attr(755,root,root) %{_bindir}/pytest
 %attr(755,root,root) %{_bindir}/pytest-3
-%{py3_sitescriptdir}/pytest.py
+%{py3_sitescriptdir}/pytest
 %{py3_sitescriptdir}/_pytest
-%{py3_sitescriptdir}/__pycache__/pytest.*.py[co]
 %{py3_sitescriptdir}/pytest-%{version}-py*.egg-info
-%endif
 
 %if %{with doc}
 %files apidocs
diff --git a/python-pytest-tests.patch b/python-pytest-tests.patch
deleted file mode 100644
index 8f15548..0000000
--- a/python-pytest-tests.patch
+++ /dev/null
@@ -1,22 +0,0 @@
---- pytest-3.6.3/testing/code/test_excinfo.py.orig	2018-07-04 23:23:50.000000000 +0200
-+++ pytest-3.6.3/testing/code/test_excinfo.py	2018-07-18 05:46:24.873976914 +0200
-@@ -371,7 +371,8 @@
-     for item in excinfo.traceback:
-         print(item)  # XXX: for some reason jinja.Template.render is printed in full
-         item.source  # shouldnt fail
--        if item.path.basename == "test.txt":
-+        from six import string_types
-+        if not isinstance(item.path, string_types) and item.path.basename == "test.txt":
-             assert str(item.source) == "{{ h()}}:"
- 
- 
---- pytest-4.6.11/testing/acceptance_test.py.orig	2020-06-05 14:09:02.000000000 +0200
-+++ pytest-4.6.11/testing/acceptance_test.py	2020-09-15 19:53:44.014482984 +0200
-@@ -145,6 +145,7 @@
-             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 ()
-         testdir.runpytest_inprocess(*params)
-         if load_cov_early:
diff --git a/python3-pytest-tests.patch b/python3-pytest-tests.patch
new file mode 100644
index 0000000..8d4d29f
--- /dev/null
+++ b/python3-pytest-tests.patch
@@ -0,0 +1,10 @@
+--- pytest-4.6.11/testing/acceptance_test.py.orig	2020-06-05 14:09:02.000000000 +0200
++++ pytest-4.6.11/testing/acceptance_test.py	2020-09-15 19:53:44.014482984 +0200
+@@ -145,6 +145,7 @@
+             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 ()
+         testdir.runpytest_inprocess(*params)
+         if load_cov_early:
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python3-pytest.git/commitdiff/fe60a6481f26728b127ac82040491ba74339ab20



More information about the pld-cvs-commit mailing list