]> git.pld-linux.org Git - packages/python-fixtures.git/commitdiff
- updated to 2.0.0 auto/th/python-fixtures-2.0.0-1
authorJakub Bogusz <qboosh@pld-linux.org>
Sat, 14 May 2016 12:38:40 +0000 (14:38 +0200)
committerJakub Bogusz <qboosh@pld-linux.org>
Sat, 14 May 2016 12:38:40 +0000 (14:38 +0200)
- added mock patch (on python 3.3+ use dist unittest.mock instead of external mock)

python-fixtures-mock.patch [new file with mode: 0644]
python-fixtures.spec

diff --git a/python-fixtures-mock.patch b/python-fixtures-mock.patch
new file mode 100644 (file)
index 0000000..ac13c9a
--- /dev/null
@@ -0,0 +1,14 @@
+--- fixtures-2.0.0/fixtures/tests/_fixtures/test_mockpatch.py.orig     2016-03-23 23:55:38.000000000 +0100
++++ fixtures-2.0.0/fixtures/tests/_fixtures/test_mockpatch.py  2016-05-14 14:14:25.983741571 +0200
+@@ -14,7 +14,10 @@
+ import extras
+-import mock # Yes, we only test the rolling backport
++try:
++    from unittest import mock
++except:
++    import mock
+ import testtools
+ from fixtures import (
index 811aaa3f7bf3d4378374023c7d4e528935b2e153..042a3bd7797a8040a8db9f881cdd92ebf8759eac 100644 (file)
@@ -1,19 +1,20 @@
 #
 # Conditional build:
-%bcond_with    tests   # test target [as of 1.4.0 test_warnings fails in some cases]
+%bcond_without tests   # test target
 %bcond_without python2 # CPython 2.x module
 %bcond_without python3 # CPython 3.x module
 
 Summary:       Fixtures, reusable state for writing clean tests and more
 Summary(pl.UTF-8):     Wyposażenie testów - stan wielokrotnego użytku pozwalający na pisanie czystych testów
 Name:          python-fixtures
-Version:       1.4.0
+Version:       2.0.0
 Release:       1
 License:       Apache v2.0 or BSD
 Group:         Libraries/Python
 #Source0Download: https://pypi.python.org/simple/fixtures/
 Source0:       https://pypi.python.org/packages/source/f/fixtures/fixtures-%{version}.tar.gz
-# Source0-md5: b706476cb754c9587e7308f9eb18e201
+# Source0-md5: 146d706c1f211a5ca3be6de2d0850889
+Patch0:                %{name}-mock.patch
 URL:           https://pypi.python.org/pypi/fixtures
 BuildRequires: rpm-pythonprov
 BuildRequires: rpmbuild(macros) >= 1.714
@@ -24,16 +25,17 @@ BuildRequires:      python-setuptools
 %if %{with tests}
 BuildRequires: python-mock
 BuildRequires: python-six
+BuildRequires: python-testrepository
 BuildRequires: python-testtools >= 0.9.22
 %endif
 %endif
 %if %{with python3}
-BuildRequires: python3-modules >= 1:3.2
+BuildRequires: python3-modules >= 1:3.3
 BuildRequires: python3-pbr >= 0.11
 BuildRequires: python3-setuptools
 %if %{with tests}
-BuildRequires: python3-mock
 BuildRequires: python3-six
+BuildRequires: python3-testrepository
 BuildRequires: python3-testtools >= 0.9.22
 %endif
 %endif
@@ -68,7 +70,7 @@ przypadkach testowych zgodnych z modułem unittest.
 Summary:       Fixtures, reusable state for writing clean tests and more
 Summary(pl.UTF-8):     Wyposażenie testów - stan wielokrotnego użytku pozwalający na pisanie czystych testów
 Group:         Libraries/Python
-Requires:      python3-modules >= 1:3.2
+Requires:      python3-modules >= 1:3.3
 Requires:      python3-six
 Requires:      python3-testtools >= 0.9.22
 
@@ -90,14 +92,23 @@ przypadkach testowych zgodnych z modułem unittest.
 
 %prep
 %setup -q -n fixtures-%{version}
+%patch0 -p1
 
 %build
 %if %{with python2}
+# export for tests
+export PYTHON=%{__python}
 %py_build %{?with_tests:test}
+
+%{?with_tests:%{__rm} -r .testrepository}
 %endif
 
 %if %{with python3}
+# export for tests
+export PYTHON=%{__python3}
 %py3_build %{?with_tests:test}
+
+%{?with_tests:%{__rm} -r .testrepository}
 %endif
 
 %install
This page took 0.172192 seconds and 4 git commands to generate.