From 5329aaf2145412f081b6752b553f52fa8ca51b69677ba2345373ad67205cbafb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Fri, 19 Jul 2019 09:16:27 +0000 Subject: [PATCH] - Add patch to play with new pytest rather than restricting: * pytest4.patch OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-execnet?expand=0&rev=8 --- pytest4.patch | 24 ++++++++++++++++++++++++ python-execnet.changes | 6 ++++++ python-execnet.spec | 7 ++++--- 3 files changed, 34 insertions(+), 3 deletions(-) create mode 100644 pytest4.patch diff --git a/pytest4.patch b/pytest4.patch new file mode 100644 index 0000000..cc2573d --- /dev/null +++ b/pytest4.patch @@ -0,0 +1,24 @@ +Index: execnet-1.6.0/testing/conftest.py +=================================================================== +--- execnet-1.6.0.orig/testing/conftest.py ++++ execnet-1.6.0/testing/conftest.py +@@ -83,8 +83,8 @@ def getsocketspec(config=None): + + + def pytest_generate_tests(metafunc): +- if 'gw' in metafunc.funcargnames: +- assert 'anypython' not in metafunc.funcargnames, "need combine?" ++ if 'gw' in metafunc.fixturenames: ++ assert 'anypython' not in metafunc.fixturenames, "need combine?" + if hasattr(metafunc.function, 'gwtypes'): + gwtypes = metafunc.function.gwtypes + elif hasattr(metafunc.cls, 'gwtype'): +@@ -92,7 +92,7 @@ def pytest_generate_tests(metafunc): + else: + gwtypes = ['popen', 'socket', 'ssh', 'proxy'] + metafunc.parametrize("gw", gwtypes, indirect=True) +- elif 'anypython' in metafunc.funcargnames: ++ elif 'anypython' in metafunc.fixturenames: + metafunc.parametrize( + "anypython", indirect=True, argvalues=( + 'sys.executable', 'python2.7', 'pypy', 'jython', diff --git a/python-execnet.changes b/python-execnet.changes index 9e87090..b09d8d6 100644 --- a/python-execnet.changes +++ b/python-execnet.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Jul 19 09:14:51 UTC 2019 - Tomáš Chvátal + +- Add patch to play with new pytest rather than restricting: + * pytest4.patch + ------------------------------------------------------------------- Thu Jul 18 08:47:00 UTC 2019 - Ondřej Súkup diff --git a/python-execnet.spec b/python-execnet.spec index 6002a10..188030a 100644 --- a/python-execnet.spec +++ b/python-execnet.spec @@ -25,9 +25,9 @@ License: MIT Group: Development/Libraries/Python URL: https://github.com/pytest-dev/execnet Source0: https://files.pythonhosted.org/packages/source/e/execnet/execnet-%{version}.tar.gz +Patch0: pytest4.patch BuildRequires: %{python_module apipkg} -BuildRequires: %{python_module base} -BuildRequires: %{python_module pytest4} +BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools_scm} BuildRequires: %{python_module setuptools} BuildRequires: fdupes @@ -50,6 +50,7 @@ API targetting the following uses: %prep %setup -q -n execnet-%{version} +%patch0 -p1 sed -i "1d" execnet/script/shell.py execnet/script/socketserver.py %build @@ -59,7 +60,7 @@ sed -i "1d" execnet/script/shell.py execnet/script/socketserver.py %install %python_install -%python_expand %fdupes -s %{buildroot}%{$python_sitelib} +%python_expand %fdupes %{buildroot}%{$python_sitelib} %check %pytest -r s -k"not test_gateway" testing