#
# Conditional build:
-%bcond_with tests # test target [fail on builders for some reason as of 2.0.0]
+%bcond_without tests # unit tests
%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: 2.0.0
-Release: 1
+Version: 3.0.0
+Release: 5
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: 146d706c1f211a5ca3be6de2d0850889
+#Source0Download: https://pypi.org/simple/fixtures/
+Source0: https://files.pythonhosted.org/packages/source/f/fixtures/fixtures-%{version}.tar.gz
+# Source0-md5: cd6345b497a62fad739efee66346c2e0
Patch0: %{name}-mock.patch
-URL: https://pypi.python.org/pypi/fixtures
+URL: https://pypi.org/project/fixtures/
BuildRequires: rpm-pythonprov
BuildRequires: rpmbuild(macros) >= 1.714
%if %{with python2}
BuildRequires: python3-testtools >= 0.9.22
%endif
%endif
-Requires: python-six
-Requires: python-testtools >= 0.9.22
%if "%{py_ver}" >= "2.7"
Requires: python-modules >= 1:2.7
%else
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.3
-Requires: python3-six
-Requires: python3-testtools >= 0.9.22
%description -n python3-fixtures
Fixtures defines a Python contract for reusable state/support logic,
%build
%if %{with python2}
-# export for tests
-export PYTHON=%{__python}
-%py_build %{?with_tests:test}
+%py_build
-%{?with_tests:%{__rm} -r .testrepository}
+%if %{with tests}
+%{__python} -m testtools.run fixtures.test_suite
+%endif
%endif
%if %{with python3}
-# export for tests
-export PYTHON=%{__python3}
-%py3_build %{?with_tests:test}
+%py3_build
-%{?with_tests:%{__rm} -r .testrepository}
+%if %{with tests}
+%{__python3} -m testtools.run fixtures.test_suite
+%endif
%endif
%install
%if %{with python2}
%py_install
+%{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/fixtures/tests
%py_postclean
%endif
%if %{with python3}
%py3_install
+
+%{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/fixtures/tests
%endif
%clean