forked from pool/python-invocations
- Add patch to fix tests on python3:
* invocations-py3.patch OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-invocations?expand=0&rev=10
This commit is contained in:
parent
7349637ac6
commit
0fc91b5bd6
19
invocations-py3.patch
Normal file
19
invocations-py3.patch
Normal file
@ -0,0 +1,19 @@
|
||||
Index: invocations-1.4.0/tests/autodoc/base.py
|
||||
===================================================================
|
||||
--- invocations-1.4.0.orig/tests/autodoc/base.py
|
||||
+++ invocations-1.4.0/tests/autodoc/base.py
|
||||
@@ -1,4 +1,5 @@
|
||||
from os.path import join, dirname
|
||||
+import codecs
|
||||
import re
|
||||
import shutil
|
||||
|
||||
@@ -28,7 +29,7 @@ class autodoc_:
|
||||
def setup_class(self):
|
||||
# Build once, introspect many...for now
|
||||
self.build_dir = _build()
|
||||
- with open(join(self.build_dir, "api.html")) as fd:
|
||||
+ with codecs.open(join(self.build_dir, "api.html"), 'r', encoding='utf-8') as fd:
|
||||
self.api_docs = fd.read()
|
||||
|
||||
@classmethod
|
@ -4,6 +4,8 @@ Sat Aug 11 12:01:52 UTC 2018 - tchvatal@suse.com
|
||||
- Drop the multibuild as the cycle is gone
|
||||
- Add patch to not rely on bundled stuff:
|
||||
* invocations-no-bundled.patch
|
||||
- Add patch to fix tests on python3:
|
||||
* invocations-py3.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Aug 11 10:01:08 UTC 2018 - tchvatal@suse.com
|
||||
|
@ -26,6 +26,7 @@ Group: Development/Languages/Python
|
||||
URL: http://pyinvoke.org
|
||||
Source: https://github.com/pyinvoke/invocations/archive/%{version}.tar.gz
|
||||
Patch0: invocations-no-bundled.patch
|
||||
Patch1: invocations-py3.patch
|
||||
BuildRequires: %{python_module blessings >= 1.6}
|
||||
BuildRequires: %{python_module invoke >= 1.0}
|
||||
BuildRequires: %{python_module mock}
|
||||
@ -69,6 +70,7 @@ the Invoke project's communication channels for updates. Thanks!
|
||||
%prep
|
||||
%setup -q -n invocations-%{version}
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
|
||||
%build
|
||||
%python_build
|
||||
@ -78,7 +80,8 @@ the Invoke project's communication channels for updates. Thanks!
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
|
||||
%check
|
||||
%{python_expand export PYTHONPATH=.
|
||||
export PYTHONDONTWRITEBYTECODE=1
|
||||
%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitelib}
|
||||
py.test-%{$python_bin_suffix}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user