From 8caf53a9a1fc5662e86de306bb98053bef92566c6f5e390cb0dfcd3fbca9c862 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20S=C3=BAkup?= Date: Sat, 28 Dec 2019 17:37:01 +0000 Subject: [PATCH 1/6] - fix dependency on python-path.py OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-shutil?expand=0&rev=7 --- python-pytest-shutil.changes | 5 +++++ python-pytest-shutil.spec | 7 ++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/python-pytest-shutil.changes b/python-pytest-shutil.changes index 8db1594..43257eb 100644 --- a/python-pytest-shutil.changes +++ b/python-pytest-shutil.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sat Dec 28 17:36:29 UTC 2019 - Ondřej Súkup + +- fix dependency on python-path.py + ------------------------------------------------------------------- Mon Jun 3 09:07:17 UTC 2019 - Tomáš Chvátal diff --git a/python-pytest-shutil.spec b/python-pytest-shutil.spec index 4823278..a634875 100644 --- a/python-pytest-shutil.spec +++ b/python-pytest-shutil.spec @@ -1,7 +1,7 @@ # # spec file for package python-pytest-shutil # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -38,12 +38,12 @@ BuildRequires: python-contextlib2 BuildRequires: python-rpm-macros Requires: python-execnet Requires: python-mock -Requires: python-path.py Requires: python-pytest Requires: python-six Requires: python-termcolor %ifpython2 Requires: python-contextlib2 +Requires: python-path.py %endif BuildArch: noarch @@ -55,7 +55,8 @@ tools for automated tests. %prep %setup -q -n pytest-shutil-%{version} -sed -i '/contextlib2/d' setup.py +sed -i 's/contextlib2/contextlib2;python_version<"3"/' setup.py +sed -i 's/path\.py/path\.py;python_version<"3"/' setup.py %build %python_build From 93876f418b25b620cc51fb5de28f2bdb0b61085642959b6fb971f30f33d91d74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20S=C3=BAkup?= Date: Sat, 28 Dec 2019 18:09:35 +0000 Subject: [PATCH 2/6] - add fix_pathlib.patch OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-shutil?expand=0&rev=8 --- fix_pathlib.patch | 50 ++++++++++++++++++++++++++++++++++++ python-pytest-shutil.changes | 1 + python-pytest-shutil.spec | 4 +-- 3 files changed, 53 insertions(+), 2 deletions(-) create mode 100644 fix_pathlib.patch diff --git a/fix_pathlib.patch b/fix_pathlib.patch new file mode 100644 index 0000000..6bb99ca --- /dev/null +++ b/fix_pathlib.patch @@ -0,0 +1,50 @@ +Index: pytest-shutil-1.7.0/pytest_shutil/workspace.py +=================================================================== +--- pytest-shutil-1.7.0.orig/pytest_shutil/workspace.py ++++ pytest-shutil-1.7.0/pytest_shutil/workspace.py +@@ -8,9 +8,14 @@ import logging + import subprocess + + try: +- from path import Path ++ from pathlib import Path ++ Path.isdir = Path.is_dir ++ Path.makedirs = Path.mkdir + except ImportError: +- from path import path as Path ++ try: ++ from path import Path ++ except ImportError: ++ from path import path as Path + + import pytest + from six import string_types +Index: pytest-shutil-1.7.0/setup.py +=================================================================== +--- pytest-shutil-1.7.0.orig/setup.py ++++ pytest-shutil-1.7.0/setup.py +@@ -24,9 +24,9 @@ classifiers = [ + + install_requires = ['six', + 'execnet', +- 'contextlib2', ++ 'contextlib2;python_version<"3"', + 'pytest', +- 'path.py', ++ 'path.py;python_version<"3"', + 'mock', + 'termcolor' + ] +Index: pytest-shutil-1.7.0/tests/integration/test_run_integration.py +=================================================================== +--- pytest-shutil-1.7.0.orig/tests/integration/test_run_integration.py ++++ pytest-shutil-1.7.0/tests/integration/test_run_integration.py +@@ -192,7 +192,7 @@ def test_run_in_subprocess_uses_passed_p + def test_run_in_subprocess_cd(): + with workspace.Workspace() as ws: + with no_cov(): +- cwd = run.run_in_subprocess(os.getcwd, cd=ws.workspace)() ++ cwd = run.run_in_subprocess(os.getcwd, cd=str(ws.workspace))() + assert os.path.realpath(cwd) == os.path.realpath(ws.workspace) + + diff --git a/python-pytest-shutil.changes b/python-pytest-shutil.changes index 43257eb..06108ee 100644 --- a/python-pytest-shutil.changes +++ b/python-pytest-shutil.changes @@ -2,6 +2,7 @@ Sat Dec 28 17:36:29 UTC 2019 - Ondřej Súkup - fix dependency on python-path.py +- add fix_pathlib.patch ------------------------------------------------------------------- Mon Jun 3 09:07:17 UTC 2019 - Tomáš Chvátal diff --git a/python-pytest-shutil.spec b/python-pytest-shutil.spec index a634875..bb0e3b6 100644 --- a/python-pytest-shutil.spec +++ b/python-pytest-shutil.spec @@ -25,6 +25,7 @@ License: MIT Group: Development/Languages/Python URL: https://github.com/manahl/pytest-plugins Source: https://files.pythonhosted.org/packages/source/p/pytest-shutil/pytest-shutil-%{version}.tar.gz +Patch0: fix_pathlib.patch BuildRequires: %{python_module execnet} BuildRequires: %{python_module mock} BuildRequires: %{python_module path.py} @@ -55,8 +56,7 @@ tools for automated tests. %prep %setup -q -n pytest-shutil-%{version} -sed -i 's/contextlib2/contextlib2;python_version<"3"/' setup.py -sed -i 's/path\.py/path\.py;python_version<"3"/' setup.py +%patch0 -p1 %build %python_build From 7b1b883a2f1258f2571f4dfbb2e739ed9c264b1edf0159150280bb0ab186c451 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20S=C3=BAkup?= Date: Sat, 28 Dec 2019 18:20:37 +0000 Subject: [PATCH 3/6] osc copypac from project:devel:languages:python:pytest package:python-pytest-shutil revision:6, using keep-link OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-shutil?expand=0&rev=9 --- fix_pathlib.patch | 50 ------------------------------------ python-pytest-shutil.changes | 6 ----- python-pytest-shutil.spec | 7 +++-- 3 files changed, 3 insertions(+), 60 deletions(-) delete mode 100644 fix_pathlib.patch diff --git a/fix_pathlib.patch b/fix_pathlib.patch deleted file mode 100644 index 6bb99ca..0000000 --- a/fix_pathlib.patch +++ /dev/null @@ -1,50 +0,0 @@ -Index: pytest-shutil-1.7.0/pytest_shutil/workspace.py -=================================================================== ---- pytest-shutil-1.7.0.orig/pytest_shutil/workspace.py -+++ pytest-shutil-1.7.0/pytest_shutil/workspace.py -@@ -8,9 +8,14 @@ import logging - import subprocess - - try: -- from path import Path -+ from pathlib import Path -+ Path.isdir = Path.is_dir -+ Path.makedirs = Path.mkdir - except ImportError: -- from path import path as Path -+ try: -+ from path import Path -+ except ImportError: -+ from path import path as Path - - import pytest - from six import string_types -Index: pytest-shutil-1.7.0/setup.py -=================================================================== ---- pytest-shutil-1.7.0.orig/setup.py -+++ pytest-shutil-1.7.0/setup.py -@@ -24,9 +24,9 @@ classifiers = [ - - install_requires = ['six', - 'execnet', -- 'contextlib2', -+ 'contextlib2;python_version<"3"', - 'pytest', -- 'path.py', -+ 'path.py;python_version<"3"', - 'mock', - 'termcolor' - ] -Index: pytest-shutil-1.7.0/tests/integration/test_run_integration.py -=================================================================== ---- pytest-shutil-1.7.0.orig/tests/integration/test_run_integration.py -+++ pytest-shutil-1.7.0/tests/integration/test_run_integration.py -@@ -192,7 +192,7 @@ def test_run_in_subprocess_uses_passed_p - def test_run_in_subprocess_cd(): - with workspace.Workspace() as ws: - with no_cov(): -- cwd = run.run_in_subprocess(os.getcwd, cd=ws.workspace)() -+ cwd = run.run_in_subprocess(os.getcwd, cd=str(ws.workspace))() - assert os.path.realpath(cwd) == os.path.realpath(ws.workspace) - - diff --git a/python-pytest-shutil.changes b/python-pytest-shutil.changes index 06108ee..8db1594 100644 --- a/python-pytest-shutil.changes +++ b/python-pytest-shutil.changes @@ -1,9 +1,3 @@ -------------------------------------------------------------------- -Sat Dec 28 17:36:29 UTC 2019 - Ondřej Súkup - -- fix dependency on python-path.py -- add fix_pathlib.patch - ------------------------------------------------------------------- Mon Jun 3 09:07:17 UTC 2019 - Tomáš Chvátal diff --git a/python-pytest-shutil.spec b/python-pytest-shutil.spec index bb0e3b6..4823278 100644 --- a/python-pytest-shutil.spec +++ b/python-pytest-shutil.spec @@ -1,7 +1,7 @@ # # spec file for package python-pytest-shutil # -# Copyright (c) 2019 SUSE LLC +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -25,7 +25,6 @@ License: MIT Group: Development/Languages/Python URL: https://github.com/manahl/pytest-plugins Source: https://files.pythonhosted.org/packages/source/p/pytest-shutil/pytest-shutil-%{version}.tar.gz -Patch0: fix_pathlib.patch BuildRequires: %{python_module execnet} BuildRequires: %{python_module mock} BuildRequires: %{python_module path.py} @@ -39,12 +38,12 @@ BuildRequires: python-contextlib2 BuildRequires: python-rpm-macros Requires: python-execnet Requires: python-mock +Requires: python-path.py Requires: python-pytest Requires: python-six Requires: python-termcolor %ifpython2 Requires: python-contextlib2 -Requires: python-path.py %endif BuildArch: noarch @@ -56,7 +55,7 @@ tools for automated tests. %prep %setup -q -n pytest-shutil-%{version} -%patch0 -p1 +sed -i '/contextlib2/d' setup.py %build %python_build From 05bb53ad967f64f8a6e276f86b36d492d1abd5be2c6d1b9ed69a807e63059652 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20S=C3=BAkup?= Date: Sat, 28 Dec 2019 18:31:37 +0000 Subject: [PATCH 4/6] - fix python-path/python-path.py requires OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-shutil?expand=0&rev=10 --- python-pytest-shutil.changes | 5 +++++ python-pytest-shutil.spec | 12 +++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/python-pytest-shutil.changes b/python-pytest-shutil.changes index 8db1594..f766c7d 100644 --- a/python-pytest-shutil.changes +++ b/python-pytest-shutil.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sat Dec 28 18:31:07 UTC 2019 - Ondřej Súkup + +- fix python-path/python-path.py requires + ------------------------------------------------------------------- Mon Jun 3 09:07:17 UTC 2019 - Tomáš Chvátal diff --git a/python-pytest-shutil.spec b/python-pytest-shutil.spec index 4823278..b170afc 100644 --- a/python-pytest-shutil.spec +++ b/python-pytest-shutil.spec @@ -1,7 +1,7 @@ # # spec file for package python-pytest-shutil # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -27,7 +27,6 @@ URL: https://github.com/manahl/pytest-plugins Source: https://files.pythonhosted.org/packages/source/p/pytest-shutil/pytest-shutil-%{version}.tar.gz BuildRequires: %{python_module execnet} BuildRequires: %{python_module mock} -BuildRequires: %{python_module path.py} BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools-git} BuildRequires: %{python_module setuptools} @@ -36,14 +35,20 @@ BuildRequires: %{python_module termcolor} BuildRequires: fdupes BuildRequires: python-contextlib2 BuildRequires: python-rpm-macros +BuildRequires: python2-path.py +BuildRequires: python3-path Requires: python-execnet Requires: python-mock -Requires: python-path.py +Requires: python-path Requires: python-pytest Requires: python-six Requires: python-termcolor %ifpython2 Requires: python-contextlib2 +Requires: python2-path.py +%endif +%ifpython3 +Requires: python3-path %endif BuildArch: noarch @@ -56,6 +61,7 @@ tools for automated tests. %prep %setup -q -n pytest-shutil-%{version} sed -i '/contextlib2/d' setup.py +sed -i '/path.\py/d' setup.py %build %python_build From 82c80373e60487f82f34104d59d6d871f54efb7a29a54ed74af69dc5fa9cec1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20S=C3=BAkup?= Date: Sat, 28 Dec 2019 19:47:03 +0000 Subject: [PATCH 5/6] try OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-shutil?expand=0&rev=11 --- python-pytest-shutil.spec | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/python-pytest-shutil.spec b/python-pytest-shutil.spec index b170afc..9de804e 100644 --- a/python-pytest-shutil.spec +++ b/python-pytest-shutil.spec @@ -27,6 +27,7 @@ URL: https://github.com/manahl/pytest-plugins Source: https://files.pythonhosted.org/packages/source/p/pytest-shutil/pytest-shutil-%{version}.tar.gz BuildRequires: %{python_module execnet} BuildRequires: %{python_module mock} +BuildRequires: %{python_module path.py} BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools-git} BuildRequires: %{python_module setuptools} @@ -35,8 +36,6 @@ BuildRequires: %{python_module termcolor} BuildRequires: fdupes BuildRequires: python-contextlib2 BuildRequires: python-rpm-macros -BuildRequires: python2-path.py -BuildRequires: python3-path Requires: python-execnet Requires: python-mock Requires: python-path @@ -45,10 +44,6 @@ Requires: python-six Requires: python-termcolor %ifpython2 Requires: python-contextlib2 -Requires: python2-path.py -%endif -%ifpython3 -Requires: python3-path %endif BuildArch: noarch From 355bb78ea711027026053c66a2533f160cef90c42cbebf274ff6a16d254ca14a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20S=C3=BAkup?= Date: Sat, 28 Dec 2019 19:59:01 +0000 Subject: [PATCH 6/6] fix OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-shutil?expand=0&rev=12 --- python-pytest-shutil.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-pytest-shutil.spec b/python-pytest-shutil.spec index 9de804e..8f2db64 100644 --- a/python-pytest-shutil.spec +++ b/python-pytest-shutil.spec @@ -38,7 +38,7 @@ BuildRequires: python-contextlib2 BuildRequires: python-rpm-macros Requires: python-execnet Requires: python-mock -Requires: python-path +Requires: python-path.py Requires: python-pytest Requires: python-six Requires: python-termcolor