]> git.pld-linux.org Git - packages/python-pytest.git/blame - python-pytest.spec
- pytest.py seems required for some tests; release 2
[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}
c4594506 12Version: 2.9.2
08c08cc1 13Release: 2
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
18# Source0-md5: b65c2944dfaa0efb62c0239afb424f5b
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
bd571570
JB
38BuildArch: noarch
39BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
40
41%description
42py.test is a simple and popular testing tool for Python.
43
44%description -l pl.UTF-8
45py.test to proste i popularne narzędzie testujące dla Pythona.
46
e4983238
ER
47%package -n python3-pytest
48Summary: Simple powerful testing with Python
6b847094 49Summary(pl.UTF-8): Proste, ale funkcjonalne narzędzie testujące dla Pythona
e4983238 50Group: Development/Languages
6b847094 51Suggests: python3-setuptools
e4983238
ER
52
53%description -n python3-pytest
54py.test provides simple, yet powerful testing for Python.
55
6b847094
JB
56%description -n python3-pytest -l pl.UTF-8
57py.test to proste, ale bardzo funkcjonalne narzędzie testujące dla
58Pythona.
59
c4594506
JB
60%package apidocs
61Summary: Documentation for py.test Pythona package
62Summary(pl.UTF-8): Dokumentacja pakietu Pythona py.test
63Group: Documentation
64
65%description apidocs
66Documentation for py.test Pythona package.
67
68%description apidocs -l pl.UTF-8
69Dokumentacja pakietu Pythona py.test.
70
bd571570 71%prep
e4983238
ER
72%setup -q -n %{module}-%{version}
73
bd571570 74%build
08c08cc1 75%if %{with python2}
ac22139b 76%py_build
08c08cc1 77%endif
bd571570 78
e4983238 79%if %{with python3}
ac22139b 80%py3_build
e4983238
ER
81%endif
82
bd571570 83%if %{with doc}
e4983238
ER
84install -d _htmldocs/html
85for l in doc/*; do
86 PYTHONPATH=$(pwd) \
87 %{__make} -C $l html
88 # remove hidden file
c4594506
JB
89 %{__rm} $l/_build/html/.buildinfo
90 %{__mv} $l/_build/html _htmldocs/html/${l##doc/}
e4983238 91done
bd571570
JB
92%endif
93
94%install
95rm -rf $RPM_BUILD_ROOT
ac22139b
JK
96
97%if %{with python3}
98%py3_install
99%endif
100
08c08cc1 101%if %{with python2}
ac22139b 102%py_install
bd571570 103
08c08cc1
JB
104# pytest.py source seems required for "monkeypatching" tests
105%py_postclean -x pytest.py
106%endif
bd571570
JB
107
108%clean
109rm -rf $RPM_BUILD_ROOT
110
08c08cc1 111%if %{with python2}
bd571570
JB
112%files
113%defattr(644,root,root,755)
c4594506 114%doc AUTHORS CHANGELOG.rst LICENSE README.rst
bd571570
JB
115%attr(755,root,root) %{_bindir}/py.test
116%attr(755,root,root) %{_bindir}/py.test-%{py_ver}
08c08cc1 117%{py_sitescriptdir}/pytest.py*
bd571570
JB
118%{py_sitescriptdir}/_pytest
119%{py_sitescriptdir}/pytest-%{version}-py*.egg-info
08c08cc1 120%endif
e4983238
ER
121
122%if %{with python3}
123%files -n python3-pytest
124%defattr(644,root,root,755)
c4594506 125%doc AUTHORS CHANGELOG.rst LICENSE README.rst
e4983238 126%attr(755,root,root) %{_bindir}/py.test-%{py3_ver}
6b847094 127%{py3_sitescriptdir}/pytest.py
e4983238 128%{py3_sitescriptdir}/_pytest
6b847094 129%{py3_sitescriptdir}/__pycache__/pytest.*.py[co]
e4983238
ER
130%{py3_sitescriptdir}/pytest-%{version}-py*.egg-info
131%endif
c4594506
JB
132
133%if %{with doc}
134%files apidocs
135%defattr(644,root,root,755)
136%doc _htmldocs/html
137%endif
This page took 0.055988 seconds and 4 git commands to generate.