]> git.pld-linux.org Git - packages/python-fixtures.git/blobdiff - python-fixtures.spec
- release 5 (by relup.sh)
[packages/python-fixtures.git] / python-fixtures.spec
index c5d59ccb8c5bec3705199682a00d3308cc9c721b..e2c3f0bfd954f882929f9d0e23bd1cc2e3b18ad2 100644 (file)
@@ -1,6 +1,6 @@
 #
 # 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
 
@@ -8,14 +8,14 @@ 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:       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}
@@ -92,19 +92,19 @@ przypadkach testowych zgodnych z modułem unittest.
 
 %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
@@ -113,11 +113,14 @@ rm -rf $RPM_BUILD_ROOT
 %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
This page took 0.09723 seconds and 4 git commands to generate.