Hello community, here is the log from the commit of package python3-mock for openSUSE:Factory checked in at 2014-02-13 15:02:56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python3-mock (Old) and /work/SRC/openSUSE:Factory/.python3-mock.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python3-mock" Changes: -------- --- /work/SRC/openSUSE:Factory/python3-mock/python3-mock.changes 2013-08-27 21:22:10.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.python3-mock.new/python3-mock.changes 2014-02-13 15:02:57.000000000 +0100 @@ -1,0 +2,8 @@ +Wed Feb 12 11:03:45 UTC 2014 - [email protected] + +- Add mock-unittest2py27.patch: For py3.2+, the stdlib unittest module + is sufficient +- Remove python-unittest2 requirement +- Use python-setuptools instead of distribute (upstreams merged) + +------------------------------------------------------------------- New: ---- mock-unittest2py27.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python3-mock.spec ++++++ --- /var/tmp/diff_new_pack.0n9IWi/_old 2014-02-13 15:02:57.000000000 +0100 +++ /var/tmp/diff_new_pack.0n9IWi/_new 2014-02-13 15:02:57.000000000 +0100 @@ -1,7 +1,7 @@ # # spec file for package python3-mock # -# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -24,11 +24,13 @@ License: BSD-2-Clause Group: Development/Languages/Python Source: http://pypi.python.org/packages/source/m/mock/mock-%{version}.tar.gz +# PATCH-FIX-UPSTREAM [email protected] -- http://code.google.com/p/mock/issues/detail?id=194 +Patch0: mock-unittest2py27.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build +#NOTE(saschpe): Need 'python3' for the xml module: BuildRequires: python3 BuildRequires: python3-devel -BuildRequires: python3-distribute -BuildRequires: python3-unittest2 +BuildRequires: python3-setuptools BuildArch: noarch %description @@ -40,6 +42,7 @@ %prep %setup -q -n mock-%{version} +%patch0 -p1 rm -rf html/.doctrees # Remove junk %build @@ -49,7 +52,7 @@ python3 setup.py install --prefix=%{_prefix} --root=%{buildroot} %check -unit2-python%{py3_ver} discover +python3 setup.py test %files %defattr(-,root,root,-) ++++++ mock-unittest2py27.patch ++++++ # HG changeset patch # User Sascha Peilicke <[email protected]> # Date 1392200447 -3600 # Wed Feb 12 11:20:47 2014 +0100 # Node ID 3f15152f49e49e745d63e066b23b482454c67fc9 # Parent d356250e275daa62b2972521885f42fa639341e6 Fix unittest2 check for Python-2.7 The features of unittest2 are available from py2.7+ or py3.2+. Fix the test accordingly. While at it, simplify other related tests. diff -r d356250e275d -r 3f15152f49e4 setup.py --- a/setup.py Tue Apr 09 14:53:33 2013 +0100 +++ b/setup.py Wed Feb 12 11:20:47 2014 +0100 @@ -7,6 +7,7 @@ from mock import __version__ import os +import sys NAME = 'mock' @@ -66,7 +67,11 @@ except ImportError: from distutils.core import setup else: - params['tests_require'] = ['unittest2'] - params['test_suite'] = 'unittest2.collector' + info = sys.version_info[:3] + if info >= (3, 2, 0) or (info[0] == 2 and info >= (2, 7, 0)): + params['test_suite'] = 'tests' + else: + params['tests_require'] = ['unittest2'] + params['test_suite'] = 'unittest2.collector' setup(**params) diff -r d356250e275d -r 3f15152f49e4 tests/support.py --- a/tests/support.py Tue Apr 09 14:53:33 2013 +0100 +++ b/tests/support.py Wed Feb 12 11:20:47 2014 +0100 @@ -1,8 +1,11 @@ import sys -info = sys.version_info -if info[:3] >= (3, 2, 0): - # for Python 3.2 ordinary unittest is fine +info = sys.version_info[:3] +inPy3k = info[0] == 3 +with_available = info >= (2, 5, 0) + +if info >= (3, 2, 0) or (info[0] == 2 and info >= (2, 7, 0)): + # for Python 3.2+ or 2.7+ ordinary unittest is fine import unittest as unittest2 else: import unittest2 @@ -15,10 +18,6 @@ return hasattr(obj, '__call__') -inPy3k = sys.version_info[0] == 3 -with_available = sys.version_info[:2] >= (2, 5) - - def is_instance(obj, klass): """Version of is_instance that doesn't access __class__""" return issubclass(type(obj), klass) -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
