3 %bcond_without doc # HTML documentation build
4 %bcond_without python2 # CPython 2.x module
5 %bcond_without python3 # CPython 3.x module
7 %define pylib_version 1.4.29
9 Summary: Simple and popular testing tool for Python
10 Summary(pl.UTF-8): Proste i popularne narzędzie testujące dla Pythona
11 Name: python-%{module}
15 Group: Development/Languages/Python
16 #Source0Download: https://pypi.python.org/simple/pytest
17 Source0: https://files.pythonhosted.org/packages/source/p/pytest/pytest-%{version}.tar.gz
18 # Source0-md5: 89c60546507dc7eb6e9e40a6e9f720bd
19 URL: http://pytest.org/
21 BuildRequires: python-devel >= 1:2.6
22 BuildRequires: python-modules >= 1:2.6
23 BuildRequires: python-py >= %{pylib_version}
24 BuildRequires: python-setuptools >= 7.0
27 BuildRequires: python3-devel >= 1:3.3
28 BuildRequires: python3-modules >= 1:3.3
29 BuildRequires: python3-py >= %{pylib_version}
30 BuildRequires: python3-setuptools >= 7.0
32 BuildRequires: rpm-pythonprov
33 BuildRequires: rpmbuild(macros) >= 1.714
34 BuildRequires: sed >= 4.0
36 BuildRequires: sphinx-pdg >= 1.0
38 Requires: python-modules
39 Requires: python-setuptools
40 Obsoletes: python-pytest-cache
42 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
45 py.test is a simple and popular testing tool for Python.
47 %description -l pl.UTF-8
48 py.test to proste i popularne narzędzie testujące dla Pythona.
50 %package -n python3-pytest
51 Summary: Simple powerful testing with Python
52 Summary(pl.UTF-8): Proste, ale funkcjonalne narzędzie testujące dla Pythona
53 Group: Development/Languages
54 Requires: python3-devel-tools
55 Requires: python3-setuptools
56 Obsoletes: python3-pytest-cache
58 %description -n python3-pytest
59 py.test provides simple, yet powerful testing for Python.
61 %description -n python3-pytest -l pl.UTF-8
62 py.test to proste, ale bardzo funkcjonalne narzędzie testujące dla
66 Summary: Documentation for py.test Pythona package
67 Summary(pl.UTF-8): Dokumentacja pakietu Pythona py.test
71 Documentation for py.test Pythona package.
73 %description apidocs -l pl.UTF-8
74 Dokumentacja pakietu Pythona py.test.
77 %setup -q -n %{module}-%{version}
89 install -d _htmldocs/html
94 %{__rm} $l/_build/html/.buildinfo
95 %{__mv} $l/_build/html _htmldocs/html/${l##doc/}
100 rm -rf $RPM_BUILD_ROOT
105 %{__mv} $RPM_BUILD_ROOT%{_bindir}/py.test{,-3}
106 %{__mv} $RPM_BUILD_ROOT%{_bindir}/pytest{,-3}
112 ln $RPM_BUILD_ROOT%{_bindir}/py.test{,-2}
113 ln $RPM_BUILD_ROOT%{_bindir}/pytest{,-2}
115 # pytest.py source seems required for "monkeypatching" tests
116 %py_postclean -x pytest.py
120 rm -rf $RPM_BUILD_ROOT
124 %defattr(644,root,root,755)
125 %doc AUTHORS CHANGELOG.rst LICENSE README.rst
126 %attr(755,root,root) %{_bindir}/py.test
127 %attr(755,root,root) %{_bindir}/py.test-2
128 %attr(755,root,root) %{_bindir}/pytest
129 %attr(755,root,root) %{_bindir}/pytest-2
130 %{py_sitescriptdir}/pytest.py*
131 %{py_sitescriptdir}/_pytest
132 %{py_sitescriptdir}/pytest-%{version}-py*.egg-info
136 %files -n python3-pytest
137 %defattr(644,root,root,755)
138 %doc AUTHORS CHANGELOG.rst LICENSE README.rst
139 %attr(755,root,root) %{_bindir}/py.test-3
140 %attr(755,root,root) %{_bindir}/pytest-3
141 %{py3_sitescriptdir}/pytest.py
142 %{py3_sitescriptdir}/_pytest
143 %{py3_sitescriptdir}/__pycache__/pytest.*.py[co]
144 %{py3_sitescriptdir}/pytest-%{version}-py*.egg-info
149 %defattr(644,root,root,755)