diff --git a/pytest4.patch b/pytest4.patch new file mode 100644 index 0000000..92f3d67 --- /dev/null +++ b/pytest4.patch @@ -0,0 +1,11 @@ +--- a/test_apipkg.py ++++ b/test_apipkg.py +@@ -13,7 +13,7 @@ + class TestRealModule: + + def setup_class(cls): +- cls.tmpdir = py.test.ensuretemp('test_apipkg') ++ cls.tmpdir = py.path.local('test_apipkg') + sys.path = [str(cls.tmpdir)] + sys.path + pkgdir = cls.tmpdir.ensure('realtest', dir=1) + diff --git a/python-apipkg.changes b/python-apipkg.changes index 3cadb96..e2d1eea 100644 --- a/python-apipkg.changes +++ b/python-apipkg.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Feb 12 14:15:58 UTC 2019 - Tomáš Chvátal + +- Add patch to fix build with pytest newer than 4: + * pytest4.patch + ------------------------------------------------------------------- Sun Aug 5 17:06:32 UTC 2018 - mimi.vx@gmail.com diff --git a/python-apipkg.spec b/python-apipkg.spec index cf7ad69..e87c04b 100644 --- a/python-apipkg.spec +++ b/python-apipkg.spec @@ -1,7 +1,7 @@ # # spec file for package python-apipkg # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# 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 @@ -12,7 +12,7 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # @@ -25,7 +25,7 @@ License: MIT Group: Development/Languages/Python URL: https://github.com/pytest-dev/apipkg/ Source: https://files.pythonhosted.org/packages/source/a/apipkg/apipkg-%{version}.tar.gz -BuildRequires: %{python_module base} +Patch0: pytest4.patch BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools_scm} BuildRequires: %{python_module setuptools} @@ -47,6 +47,7 @@ can copy paste the <100 Lines of code into your project. %prep %setup -q -n apipkg-%{version} +%patch0 -p1 %build %python_build @@ -56,8 +57,7 @@ can copy paste the <100 Lines of code into your project. %python_expand %fdupes -s %{buildroot}%{$python_sitelib} %check -export PYTHONPATH="${PWD}/src" -%python_exec -mpytest +%python_expand PYTHONPATH="%{buildroot}%{$python_sitelib}" $python -m pytest %files %{python_files} %license LICENSE