Hello community,

here is the log from the commit of package python-mock for openSUSE:Factory 
checked in at 2017-02-27 18:39:51
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-mock (Old)
 and      /work/SRC/openSUSE:Factory/.python-mock.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-mock"

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-mock/python-mock.changes  2016-10-14 
03:37:53.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.python-mock.new/python-mock.changes     
2017-02-27 18:39:52.685300715 +0100
@@ -1,0 +2,10 @@
+Thu Oct  6 16:19:38 UTC 2016 - jmate...@suse.com
+
+- update for multipython build
+- remove test runner because it performs dark magic that
+  causes a failure in test suite
+- implement fallback to python's own unittest instead of unittest2
+  if we're on Python 3 (to avoid dependencies on funcsigs and unittest2)
+  (unittest2-fallback.patch)
+
+-------------------------------------------------------------------

New:
----
  unittest2-fallback.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-mock.spec ++++++
--- /var/tmp/diff_new_pack.pQSvpj/_old  2017-02-27 18:39:53.381202406 +0100
+++ /var/tmp/diff_new_pack.pQSvpj/_new  2017-02-27 18:39:53.385201841 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-mock
 #
-# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2017 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
@@ -16,6 +16,8 @@
 #
 
 
+%{?!python_module:%define python_module() python-%{**} python3-%{**}}
+%define oldpython python
 Name:           python-mock
 Version:        2.0.0
 Release:        0
@@ -24,24 +26,24 @@
 License:        BSD-2-Clause
 Group:          Development/Languages/Python
 Source:         https://pypi.io/packages/source/m/mock/mock-%{version}.tar.gz
+Patch0:         unittest2-fallback.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
-BuildRequires:  python-devel
+BuildRequires:  %{python_module pbr}
+BuildRequires:  %{python_module setuptools >= 17.1}
+BuildRequires:  %{python_module six}
+BuildRequires:  python-rpm-macros
+# SECTION Python2-only requirements
 BuildRequires:  python-funcsigs
-BuildRequires:  python-pbr
-BuildRequires:  python-setuptools >= 17.1
-BuildRequires:  python-six
-Requires:       python-funcsigs >= 1
-Requires:       python-pbr
-Requires:       python-six >= 1.9
-%if 0%{?suse_version} && 0%{?suse_version} < 1140
-BuildRequires:  python-ordereddict
 BuildRequires:  python-unittest2
+# /SECTION
+%ifpython2
+Requires:       %{oldpython}-funcsigs >= 1
 %endif
-%if 0%{?suse_version} && 0%{?suse_version} <= 1110
-%{!?python_sitelib: %global python_sitelib %(python -c "from 
distutils.sysconfig import get_python_lib; print get_python_lib()")}
-%else
+Requires:       python-pbr
+Requires:       python-six >= 1.9
 BuildArch:      noarch
-%endif
+
+%python_subpackages
 
 %description
 mock is a Python module that provides a core Mock class. It removes the need
@@ -52,17 +54,20 @@
 
 %prep
 %setup -q -n mock-%{version}
+# remove test runner which causes test failure all by itself
+rm mock/tests/__main__.py
+%patch0 -p1
 
 %build
-python setup.py build
+%python_build
 
 %install
-python setup.py install --prefix=%{_prefix} --root=%{buildroot}
+%python_install
 
 %check
-python setup.py test
+%python_exec setup.py test
 
-%files
+%files %python_files
 %defattr(-,root,root,-)
 %doc README.rst LICENSE.txt
 %{python_sitelib}/*

++++++ unittest2-fallback.patch ++++++
Index: mock-2.0.0/mock/tests/support.py
===================================================================
--- mock-2.0.0.orig/mock/tests/support.py
+++ mock-2.0.0/mock/tests/support.py
@@ -1,7 +1,6 @@
 import sys
 
 info = sys.version_info
-import unittest2
 
 
 try:
Index: mock-2.0.0/mock/tests/testcallable.py
===================================================================
--- mock-2.0.0.orig/mock/tests/testcallable.py
+++ mock-2.0.0/mock/tests/testcallable.py
@@ -2,7 +2,11 @@
 # E-mail: fuzzyman AT voidspace DOT org DOT uk
 # http://www.voidspace.org.uk/python/mock/
 
-import unittest2 as unittest
+try:
+    import unittest2 as unittest
+except ImportError:
+    import unittest
+
 from mock.tests.support import is_instance, X, SomeClass
 
 from mock import (
Index: mock-2.0.0/mock/tests/testhelpers.py
===================================================================
--- mock-2.0.0.orig/mock/tests/testhelpers.py
+++ mock-2.0.0/mock/tests/testhelpers.py
@@ -3,7 +3,10 @@
 # http://www.voidspace.org.uk/python/mock/
 
 import six
-import unittest2 as unittest
+try:
+    import unittest2 as unittest
+except ImportError:
+    import unittest
 
 from mock import (
     call, create_autospec, MagicMock,
Index: mock-2.0.0/mock/tests/testmagicmethods.py
===================================================================
--- mock-2.0.0.orig/mock/tests/testmagicmethods.py
+++ mock-2.0.0/mock/tests/testmagicmethods.py
@@ -16,7 +16,11 @@ import sys
 import textwrap
 
 import six
-import unittest2 as unittest
+try:
+    import unittest2 as unittest
+except ImportError:
+    import unittest
+
 
 from mock import Mock, MagicMock
 from mock.mock import _magics
Index: mock-2.0.0/mock/tests/testmock.py
===================================================================
--- mock-2.0.0.orig/mock/tests/testmock.py
+++ mock-2.0.0/mock/tests/testmock.py
@@ -8,7 +8,10 @@ import sys
 import tempfile
 
 import six
-import unittest2 as unittest
+try:
+    import unittest2 as unittest
+except ImportError:
+    import unittest
 
 import mock
 from mock import (
Index: mock-2.0.0/mock/tests/testpatch.py
===================================================================
--- mock-2.0.0.orig/mock/tests/testpatch.py
+++ mock-2.0.0/mock/tests/testpatch.py
@@ -6,7 +6,10 @@ import os
 import sys
 
 import six
-import unittest2 as unittest
+try:
+    import unittest2 as unittest
+except ImportError:
+    import unittest
 
 from mock.tests import support
 from mock.tests.support import SomeClass, is_instance, callable
Index: mock-2.0.0/mock/tests/testsentinel.py
===================================================================
--- mock-2.0.0.orig/mock/tests/testsentinel.py
+++ mock-2.0.0/mock/tests/testsentinel.py
@@ -2,7 +2,10 @@
 # E-mail: fuzzyman AT voidspace DOT org DOT uk
 # http://www.voidspace.org.uk/python/mock/
 
-import unittest2 as unittest
+try:
+    import unittest2 as unittest
+except ImportError:
+    import unittest
 
 from mock import sentinel, DEFAULT
 
Index: mock-2.0.0/mock/tests/testwith.py
===================================================================
--- mock-2.0.0.orig/mock/tests/testwith.py
+++ mock-2.0.0/mock/tests/testwith.py
@@ -4,7 +4,10 @@
 
 from warnings import catch_warnings
 
-import unittest2 as unittest
+try:
+    import unittest2 as unittest
+except ImportError:
+    import unittest
 
 from mock.tests.support import is_instance
 from mock import MagicMock, Mock, patch, sentinel, mock_open, call

Reply via email to