3 %bcond_without doc # Sphinx documentation
4 %bcond_without tests # unit tests
5 %bcond_without python2 # CPython 2.x module
6 %bcond_without python3 # CPython 3.x module
8 Summary: Collection of helpers and mock objects for unit tests and doc tests
9 Summary(pl.UTF-8): Zbiór funkcji pomocniczych i obiektów atrap do testów jednostkowych i dokumentacji
10 Name: python-testfixtures
11 # keep 6.x here for python2 support
15 Group: Libraries/Python
16 #Source0Download: https://pypi.org/simple/testfixtures/
17 Source0: https://files.pythonhosted.org/packages/source/t/testfixtures/testfixtures-%{version}.tar.gz
18 # Source0-md5: e89cfe8325778a8c519a6bf63ae3fe83
19 URL: https://pypi.org/project/testfixtures/
21 BuildRequires: python-modules >= 1:2.7
22 BuildRequires: python-setuptools
24 BuildRequires: python-django < 2
25 BuildRequires: python-mock
26 BuildRequires: python-pytest >= 3.6
27 BuildRequires: python-pytest-cov
28 BuildRequires: python-pytest-django
29 BuildRequires: python-sybil
30 BuildRequires: python-twisted
31 BuildRequires: python-zope.component
32 BuildRequires: python-zope.interface
36 BuildRequires: python3-modules >= 1:3.6
37 BuildRequires: python3-setuptools
39 BuildRequires: python3-django
40 BuildRequires: python3-pytest >= 3.6
41 BuildRequires: python3-pytest-cov
42 BuildRequires: python3-pytest-django
43 BuildRequires: python3-sybil
44 BuildRequires: python3-twisted
45 BuildRequires: python3-zope.component
46 BuildRequires: python3-zope.interface
49 BuildRequires: rpm-pythonprov
50 BuildRequires: rpmbuild(macros) >= 1.714
52 BuildRequires: sphinx-pdg
54 Requires: python-modules >= 1:2.7
56 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
59 testfixtures is a collection of helpers and mock objects that are
60 useful when writing automated tests in Python.
62 %description -l pl.UTF-8
63 testfixtures to zbiór funkcji pomocniczych i obiektów atrap,
64 przydatnych przy pisaniu automatycznych testów w Pythonie.
66 %package -n python3-testfixtures
67 Summary: Collection of helpers and mock objects for unit tests and doc tests
68 Summary(pl.UTF-8): Zbiór funkcji pomocniczych i obiektów atrap do testów jednostkowych i dokumentacji
69 Group: Libraries/Python
70 Requires: python3-modules >= 1:3.6
72 %description -n python3-testfixtures
73 testfixtures is a collection of helpers and mock objects that are
74 useful when writing automated tests in Python.
76 %description -n python3-testfixtures -l pl.UTF-8
77 testfixtures to zbiór funkcji pomocniczych i obiektów atrap,
78 przydatnych przy pisaniu automatycznych testów w Pythonie.
81 Summary: API documentation for Python testfixtures module
82 Summary(pl.UTF-8): Dokumentacja API modułu Pythona testfixtures
86 API documentation for Python testfixtures module.
88 %description apidocs -l pl.UTF-8
89 Dokumentacja API modułu Pythona testfixtures.
92 %setup -q -n testfixtures-%{version}
99 # django test fails with "no such table"
100 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
101 PYTEST_PLUGINS=pytest_django.plugin \
102 %{__python} -m pytest testfixtures/tests -k 'not test_django'
110 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
111 PYTEST_PLUGINS=pytest_django.plugin \
112 %{__python3} -m pytest testfixtures/tests
118 %{__make} -C docs html
122 rm -rf $RPM_BUILD_ROOT
135 rm -rf $RPM_BUILD_ROOT
139 %defattr(644,root,root,755)
140 %doc CHANGELOG.rst LICENSE.txt README.rst
141 %{py_sitescriptdir}/testfixtures
142 %{py_sitescriptdir}/testfixtures-%{version}-py*.egg-info
146 %files -n python3-testfixtures
147 %defattr(644,root,root,755)
148 %doc CHANGELOG.rst LICENSE.txt README.rst
149 %{py3_sitescriptdir}/testfixtures
150 %{py3_sitescriptdir}/testfixtures-%{version}-py*.egg-info
155 %defattr(644,root,root,755)
156 %doc docs/_build/html/{_static,*.html,*.js}