]> git.pld-linux.org Git - packages/python-pytest.git/blob - python-pytest.spec
589c9d4a97f7409391c79ee5eb590ebf2bb2c70e
[packages/python-pytest.git] / python-pytest.spec
1 #
2 # Conditional build:
3 %bcond_without  doc     # HTML documentation build
4 %bcond_without  python3 # CPython 3.x module
5
6 %define         pylib_version   1.4.29
7 %define         module  pytest
8 Summary:        Simple and popular testing tool for Python
9 Summary(pl.UTF-8):      Proste i popularne narzędzie testujące dla Pythona
10 Name:           python-%{module}
11 Version:        2.8.7
12 Release:        1
13 License:        MIT
14 Group:          Development/Languages/Python
15 #Source0Download: https://pypi.python.org/pypi/pytest
16 Source0:        https://pypi.python.org/packages/source/p/pytest/pytest-%{version}.tar.gz
17 # Source0-md5:  685e2137062c9821b1b74a4814795514
18 URL:            http://pytest.org/
19 BuildRequires:  python-devel >= 1:2.6
20 BuildRequires:  python-py >= %{pylib_version}
21 BuildRequires:  python-setuptools >= 7.0
22 BuildRequires:  rpm-pythonprov
23 BuildRequires:  rpmbuild(macros) >= 1.710
24 BuildRequires:  sed >= 4.0
25 %if %{with doc}
26 BuildRequires:  sphinx-pdg >= 1.0
27 %endif
28 %if %{with python3}
29 BuildRequires:  python3-devel >= 1:3.3
30 BuildRequires:  python3-modules >= 1:3.3
31 BuildRequires:  python3-py >= %{pylib_version}
32 BuildRequires:  python3-setuptools >= 7.0
33 %endif
34 Requires:       python-py >= %{pylib_version}
35 BuildArch:      noarch
36 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38 %description
39 py.test is a simple and popular testing tool for Python.
40
41 %description -l pl.UTF-8
42 py.test to proste i popularne narzędzie testujące dla Pythona.
43
44 %package -n python3-pytest
45 Summary:        Simple powerful testing with Python
46 Summary(pl.UTF-8):      Proste, ale funkcjonalne narzędzie testujące dla Pythona
47 Group:          Development/Languages
48 Requires:       python3-py >= %{pylib_version}
49 Suggests:       python3-setuptools
50
51 %description -n python3-pytest
52 py.test provides simple, yet powerful testing for Python.
53
54 %description -n python3-pytest -l pl.UTF-8
55 py.test to proste, ale bardzo funkcjonalne narzędzie testujące dla
56 Pythona.
57
58 %prep
59 %setup -q -n %{module}-%{version}
60
61 %build
62 %py_build
63
64 %if %{with python3}
65 %py3_build
66 %endif
67
68 %if %{with doc}
69 install -d _htmldocs/html
70 for l in doc/*; do
71         PYTHONPATH=$(pwd) \
72         %{__make} -C $l html
73         # remove hidden file
74         rm $l/_build/html/.buildinfo
75         mv $l/_build/html _htmldocs/html/${l##doc/}
76 done
77 %endif
78
79 %install
80 rm -rf $RPM_BUILD_ROOT
81
82 %if %{with python3}
83 %py3_install
84 %endif
85
86 %py_install
87
88 %py_postclean
89
90 %clean
91 rm -rf $RPM_BUILD_ROOT
92
93 %files
94 %defattr(644,root,root,755)
95 %doc CHANGELOG LICENSE README.rst %{?with_doc:_htmldocs/html}
96 %attr(755,root,root) %{_bindir}/py.test
97 %attr(755,root,root) %{_bindir}/py.test-%{py_ver}
98 %{py_sitescriptdir}/pytest.py[co]
99 %{py_sitescriptdir}/_pytest
100 %{py_sitescriptdir}/pytest-%{version}-py*.egg-info
101
102 %if %{with python3}
103 %files -n python3-pytest
104 %defattr(644,root,root,755)
105 %doc CHANGELOG LICENSE README.rst %{?with_doc:_htmldocs/html}
106 %attr(755,root,root) %{_bindir}/py.test-%{py3_ver}
107 %{py3_sitescriptdir}/pytest.py
108 %{py3_sitescriptdir}/_pytest
109 %{py3_sitescriptdir}/__pycache__/pytest.*.py[co]
110 %{py3_sitescriptdir}/pytest-%{version}-py*.egg-info
111 %endif
This page took 0.029605 seconds and 2 git commands to generate.