#
# 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(pl.UTF-8): Wyposażenie testów - stan wielokrotnego użytku pozwalający na pisanie czystych testów
Name: python-fixtures
Version: 3.0.0
-Release: 2
+Release: 5
License: Apache v2.0 or BSD
Group: Libraries/Python
-#Source0Download: https://pypi.python.org/simple/fixtures/
+#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}
%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