]> git.pld-linux.org Git - packages/python-pytest.git/blame - python-pytest.spec
- updated 3.0.7
[packages/python-pytest.git] / python-pytest.spec
CommitLineData
bd571570
JB
1#
2# Conditional build:
3%bcond_without doc # HTML documentation build
08c08cc1 4%bcond_without python2 # CPython 2.x module
e4983238
ER
5%bcond_without python3 # CPython 3.x module
6
8246eb60 7%define pylib_version 1.4.29
e4983238 8%define module pytest
bd571570
JB
9Summary: Simple and popular testing tool for Python
10Summary(pl.UTF-8): Proste i popularne narzędzie testujące dla Pythona
e4983238 11Name: python-%{module}
84b7690d
JB
12Version: 3.0.7
13Release: 1
bd571570
JB
14License: MIT
15Group: Development/Languages/Python
c4594506
JB
16#Source0Download: https://pypi.python.org/simple/pytest
17Source0: https://files.pythonhosted.org/packages/source/p/pytest/pytest-%{version}.tar.gz
84b7690d 18# Source0-md5: 89c60546507dc7eb6e9e40a6e9f720bd
bd571570 19URL: http://pytest.org/
08c08cc1 20%if %{with python2}
93a87154 21BuildRequires: python-devel >= 1:2.6
08c08cc1 22BuildRequires: python-modules >= 1:2.6
e4983238 23BuildRequires: python-py >= %{pylib_version}
2f6fd582 24BuildRequires: python-setuptools >= 7.0
bd571570 25%endif
e4983238 26%if %{with python3}
93a87154
JB
27BuildRequires: python3-devel >= 1:3.3
28BuildRequires: python3-modules >= 1:3.3
e4983238 29BuildRequires: python3-py >= %{pylib_version}
2f6fd582 30BuildRequires: python3-setuptools >= 7.0
e4983238 31%endif
08c08cc1
JB
32BuildRequires: rpm-pythonprov
33BuildRequires: rpmbuild(macros) >= 1.714
34BuildRequires: sed >= 4.0
35%if %{with doc}
36BuildRequires: sphinx-pdg >= 1.0
37%endif
84b7690d 38Requires: python-setuptools
fd6ab041 39Obsoletes: python-pytest-cache
bd571570
JB
40BuildArch: noarch
41BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42
43%description
44py.test is a simple and popular testing tool for Python.
45
46%description -l pl.UTF-8
47py.test to proste i popularne narzędzie testujące dla Pythona.
48
e4983238
ER
49%package -n python3-pytest
50Summary: Simple powerful testing with Python
6b847094 51Summary(pl.UTF-8): Proste, ale funkcjonalne narzędzie testujące dla Pythona
e4983238 52Group: Development/Languages
84b7690d 53Requires: python3-setuptools
fd6ab041 54Obsoletes: python3-pytest-cache
e4983238
ER
55
56%description -n python3-pytest
57py.test provides simple, yet powerful testing for Python.
58
6b847094
JB
59%description -n python3-pytest -l pl.UTF-8
60py.test to proste, ale bardzo funkcjonalne narzędzie testujące dla
61Pythona.
62
c4594506
JB
63%package apidocs
64Summary: Documentation for py.test Pythona package
65Summary(pl.UTF-8): Dokumentacja pakietu Pythona py.test
66Group: Documentation
67
68%description apidocs
69Documentation for py.test Pythona package.
70
71%description apidocs -l pl.UTF-8
72Dokumentacja pakietu Pythona py.test.
73
bd571570 74%prep
e4983238
ER
75%setup -q -n %{module}-%{version}
76
bd571570 77%build
08c08cc1 78%if %{with python2}
ac22139b 79%py_build
08c08cc1 80%endif
bd571570 81
e4983238 82%if %{with python3}
ac22139b 83%py3_build
e4983238
ER
84%endif
85
bd571570 86%if %{with doc}
e4983238
ER
87install -d _htmldocs/html
88for l in doc/*; do
89 PYTHONPATH=$(pwd) \
90 %{__make} -C $l html
91 # remove hidden file
c4594506
JB
92 %{__rm} $l/_build/html/.buildinfo
93 %{__mv} $l/_build/html _htmldocs/html/${l##doc/}
e4983238 94done
bd571570
JB
95%endif
96
97%install
98rm -rf $RPM_BUILD_ROOT
ac22139b
JK
99
100%if %{with python3}
101%py3_install
84b7690d
JB
102
103%{__mv} $RPM_BUILD_ROOT%{_bindir}/py.test{,-3}
104%{__mv} $RPM_BUILD_ROOT%{_bindir}/pytest{,-3}
ac22139b
JK
105%endif
106
08c08cc1 107%if %{with python2}
ac22139b 108%py_install
bd571570 109
84b7690d
JB
110ln $RPM_BUILD_ROOT%{_bindir}/py.test{,-2}
111ln $RPM_BUILD_ROOT%{_bindir}/pytest{,-2}
112
08c08cc1
JB
113# pytest.py source seems required for "monkeypatching" tests
114%py_postclean -x pytest.py
115%endif
bd571570
JB
116
117%clean
118rm -rf $RPM_BUILD_ROOT
119
08c08cc1 120%if %{with python2}
bd571570
JB
121%files
122%defattr(644,root,root,755)
c4594506 123%doc AUTHORS CHANGELOG.rst LICENSE README.rst
bd571570 124%attr(755,root,root) %{_bindir}/py.test
84b7690d
JB
125%attr(755,root,root) %{_bindir}/py.test-2
126%attr(755,root,root) %{_bindir}/pytest
127%attr(755,root,root) %{_bindir}/pytest-2
08c08cc1 128%{py_sitescriptdir}/pytest.py*
bd571570
JB
129%{py_sitescriptdir}/_pytest
130%{py_sitescriptdir}/pytest-%{version}-py*.egg-info
08c08cc1 131%endif
e4983238
ER
132
133%if %{with python3}
134%files -n python3-pytest
135%defattr(644,root,root,755)
c4594506 136%doc AUTHORS CHANGELOG.rst LICENSE README.rst
84b7690d
JB
137%attr(755,root,root) %{_bindir}/py.test-3
138%attr(755,root,root) %{_bindir}/pytest-3
6b847094 139%{py3_sitescriptdir}/pytest.py
e4983238 140%{py3_sitescriptdir}/_pytest
6b847094 141%{py3_sitescriptdir}/__pycache__/pytest.*.py[co]
e4983238
ER
142%{py3_sitescriptdir}/pytest-%{version}-py*.egg-info
143%endif
c4594506
JB
144
145%if %{with doc}
146%files apidocs
147%defattr(644,root,root,755)
148%doc _htmldocs/html
149%endif
This page took 0.155254 seconds and 4 git commands to generate.