Accepting request 830842 from home:mcalabkova:branches:devel:languages:python:pytest

- Update to 2.1.0
  * New ``pytest_xdist_auto_num_workers`` hook can be implemented by plugins 
    or ``conftest.py`` files to control the number of workers when 
    ``--numprocesses=auto`` is given in the command-line.
  * ``psutil`` has proven to make ``pytest-xdist`` installation in certain 
    platforms and containers problematic, so to use it for automatic number 
    of CPUs detection users need to install the ``psutil`` extra
- Add patches to keep compatibility with older pytests:
  * reintroduce-slave-terminology.patch
  * 0001-Revert-Remove-compat-for-pytest-6.patch

OBS-URL: https://build.opensuse.org/request/show/830842
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-xdist?expand=0&rev=20
This commit is contained in:
2020-08-31 14:15:07 +00:00
committed by Git OBS Bridge
parent d98e85796a
commit e064f81a24
6 changed files with 283 additions and 7 deletions

View File

@@ -19,24 +19,30 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
Name: python-pytest-xdist
Version: 2.0.0
Version: 2.1.0
Release: 0
Summary: Distributed testing and loop-on-failing for py.test
License: MIT
URL: https://github.com/pytest-dev/pytest-xdist
Source0: https://files.pythonhosted.org/packages/source/p/pytest-xdist/pytest-xdist-%{version}.tar.gz
# This is actually revert of something upstream wanted to do a long time ago, but was waiting for the rest of pytest to sync with them.
# It is only a terminology change, but one that has personal meaning for many people. On the other hand, it was breaking compatibility with pytest < 6.
# In my opinion it would be inadequate to send this patch upstream.
Patch0: reintroduce-slave-terminology.patch
# minor compatibility revert
Patch1: 0001-Revert-Remove-compat-for-pytest-6.patch
BuildRequires: %{python_module execnet >= 1.1}
BuildRequires: %{python_module filelock}
BuildRequires: %{python_module psutil >= 3.0.0}
BuildRequires: %{python_module pytest >= 6.0.0}
BuildRequires: %{python_module pytest >= 4.4.0}
BuildRequires: %{python_module pytest-forked}
BuildRequires: %{python_module setuptools_scm}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-execnet >= 1.1
Requires: python-psutil >= 3.0.0
Requires: python-pytest >= 6.0.0
Requires: python-pytest >= 4.4.0
Requires: python-pytest-forked
Suggests: python-psutil >= 3.0.0
BuildArch: noarch
%python_subpackages
@@ -66,6 +72,7 @@ You may specify different Python versions and interpreters.
%prep
%setup -q -n pytest-xdist-%{version}
%autopatch -p1
sed -i 's/\r//' README.rst
%build