11
0
forked from pool/python-apipkg

- Add patch to fix build with pytest newer than 4:

* pytest4.patch

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-apipkg?expand=0&rev=2
This commit is contained in:
Tomáš Chvátal
2019-02-12 14:16:15 +00:00
committed by Git OBS Bridge
parent f2d7c7c2d1
commit 355a7eb2e3
3 changed files with 22 additions and 5 deletions

11
pytest4.patch Normal file
View File

@@ -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)

View File

@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue Feb 12 14:15:58 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
- Add patch to fix build with pytest newer than 4:
* pytest4.patch
-------------------------------------------------------------------
Sun Aug 5 17:06:32 UTC 2018 - mimi.vx@gmail.com

View File

@@ -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