From 70e54e2649cc0a2db3d4601c16e63fbb37bb6e6c3b37ef22ef3e9270ce0012ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Tue, 8 Dec 2020 09:56:38 +0000 Subject: [PATCH] Accepting request 853627 from home:bnavigator:branches:devel:languages:python - Replace obsolete pytest-runner with %pytest macro to avoid pulling in _build directories of other flavors during testing * gh#Kozea/cairocffi#171 * gh#openSUSE/python-rpm-macros#66 OBS-URL: https://build.opensuse.org/request/show/853627 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cairocffi?expand=0&rev=34 --- python-cairocffi.changes | 8 ++++++++ python-cairocffi.spec | 12 ++++++++---- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/python-cairocffi.changes b/python-cairocffi.changes index c08fe44..f5a9c64 100644 --- a/python-cairocffi.changes +++ b/python-cairocffi.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Mon Dec 7 12:34:39 UTC 2020 - Benjamin Greiner + +- Replace obsolete pytest-runner with %pytest macro to avoid + pulling in _build directories of other flavors during testing + * gh#Kozea/cairocffi#171 + * gh#openSUSE/python-rpm-macros#66 + ------------------------------------------------------------------- Fri Oct 30 06:20:59 UTC 2020 - Michael Vetter diff --git a/python-cairocffi.spec b/python-cairocffi.spec index b6d7469..0f19e5e 100644 --- a/python-cairocffi.spec +++ b/python-cairocffi.spec @@ -28,7 +28,7 @@ URL: https://github.com/Kozea/cairocffi Source: https://files.pythonhosted.org/packages/source/c/cairocffi/cairocffi-%{version}.tar.gz BuildRequires: %{python_module cffi >= 1.1.0} BuildRequires: %{python_module numpy} -BuildRequires: %{python_module pytest-runner} +BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools >= 39.2.0} BuildRequires: %{python_module xcffib >= 0.3.2} BuildRequires: cairo @@ -65,6 +65,12 @@ This package provides the optional gdk-pixbuf image loader module. %prep %setup -q -n cairocffi-%{version} +# disable development tools for unit tests. Remove deprecated pytest-runner +sed -i -e 's/pytest-runner$/pytest/' \ + -e '/pytest-flake8$/ d' \ + -e '/pytest-isort$/ d' \ + -e '/pytest-cov$/ d' \ + -e '/^addopts.*flake8.*isort$/ d' setup.cfg %build %python_build @@ -74,9 +80,7 @@ This package provides the optional gdk-pixbuf image loader module. %python_expand %fdupes %{buildroot}%{$python_sitearch} %check -sed -i '/^addopts/d' setup.cfg -sed -i -e '/pytest-flake8/d' -e '/pytest-isort/d' -e '/pytest-cov/d' setup.cfg -%python_expand $python setup.py test +%pytest --pyargs cairocffi %files %{python_files} %license LICENSE