]>
Commit | Line | Data |
---|---|---|
5b6b56be JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without doc # documentation (uses python2) | |
4 | %bcond_with tests # perform "make test" (broken with \--build-base) | |
5 | %bcond_without python2 # CPython 2.x module | |
6 | %bcond_without python3 # CPython 3.x module | |
7 | ||
8 | %if %{without python2} | |
9 | %undefine with_doc | |
10 | %endif | |
11 | Summary: Invoke py.test as distutils command with dependency resolution | |
12 | Summary(pl.UTF-8): Wywoływanie py.test jako polecenia distutils z rozwiązywaniem zależności | |
13 | Name: python-pytest-runner | |
14 | Version: 2.5.1 | |
93c075fa | 15 | Release: 3 |
5b6b56be JB |
16 | License: MIT |
17 | Group: Libraries/Python | |
18 | #Source0Download: https://pypi.python.org/pypi/pytest-runner | |
19 | Source0: https://pypi.python.org/packages/source/p/pytest-runner/pytest-runner-%{version}.zip | |
20 | # Source0-md5: 2eef117c2f9db55d6639f5ef733575a6 | |
21 | URL: https://bitbucket.org/pytest-dev/pytest-runner | |
22 | BuildRequires: rpm-pythonprov | |
23 | BuildRequires: rpmbuild(macros) >= 1.616 | |
24 | %if %{with python2} | |
25 | BuildRequires: python-modules >= 1:2.6 | |
26 | BuildRequires: python-setuptools | |
27 | BuildRequires: python-setuptools_scm | |
28 | %{?with_doc:BuildRequires: sphinx-pdg} | |
29 | %endif | |
30 | %if %{with python3} | |
31 | BuildRequires: python3-modules >= 1:3.2 | |
32 | BuildRequires: python3-setuptools | |
33 | BuildRequires: python3-setuptools_scm | |
34 | %endif | |
35 | Requires: python-modules | |
36 | BuildArch: noarch | |
37 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
38 | ||
39 | %description | |
40 | Setup scripts can use pytest-runner to add setup.py test support for | |
41 | pytest runner. | |
42 | ||
43 | %description -l pl.UTF-8 | |
44 | Skrypty setup mogą wykorzystywać moduł pytest-runner do dodawania | |
45 | obsługi testów pytest runnera w setup.py. | |
46 | ||
47 | %package -n python3-pytest-runner | |
48 | Summary: Invoke py.test as distutils command with dependency resolution | |
49 | Summary(pl.UTF-8): Wywoływanie py.test jako polecenia distutils z rozwiązywaniem zależności | |
50 | Group: Libraries/Python | |
51 | Requires: python3-modules | |
52 | ||
53 | %description -n python3-pytest-runner | |
54 | Setup scripts can use pytest-runner to add setup.py test support for | |
55 | pytest runner. | |
56 | ||
57 | %description -n python3-pytest-runner -l pl.UTF-8 | |
58 | Skrypty setup mogą wykorzystywać moduł pytest-runner do dodawania | |
59 | obsługi testów pytest runnera w setup.py. | |
60 | ||
61 | %package apidocs | |
62 | Summary: pytest-runner module documentation | |
63 | Summary(pl.UTF-8): Dokumentacja modułu pytest-runner | |
64 | Group: Documentation | |
65 | ||
66 | %description apidocs | |
67 | Documentation for pytest-runner module. | |
68 | ||
69 | %description apidocs -l pl.UTF-8 | |
70 | Dokumentacja modułu pytest-runner. | |
71 | ||
72 | %prep | |
73 | %setup -q -n pytest-runner-%{version} | |
74 | ||
75 | %build | |
76 | %if %{with python2} | |
1ab68473 | 77 | %py_build %{?with_tests:test} |
5b6b56be JB |
78 | |
79 | %if %{with doc} | |
80 | %{__python} setup.py build_sphinx | |
81 | %endif | |
82 | %endif | |
83 | ||
84 | %if %{with python3} | |
1ab68473 | 85 | %py3_build %{?with_tests:test} |
5b6b56be JB |
86 | %endif |
87 | ||
88 | %install | |
89 | rm -rf $RPM_BUILD_ROOT | |
90 | ||
91 | %if %{with python2} | |
1ab68473 | 92 | %py_install |
5b6b56be JB |
93 | |
94 | %py_postclean | |
95 | %endif | |
96 | ||
97 | %if %{with python3} | |
1ab68473 | 98 | %py3_install |
5b6b56be JB |
99 | %endif |
100 | ||
101 | %clean | |
102 | rm -rf $RPM_BUILD_ROOT | |
103 | ||
104 | %if %{with python2} | |
105 | %files | |
106 | %defattr(644,root,root,755) | |
107 | %doc CHANGES.txt README.txt | |
108 | %{py_sitescriptdir}/ptr.py[co] | |
109 | %{py_sitescriptdir}/pytest_runner-%{version}-py*.egg-info | |
110 | %endif | |
111 | ||
112 | %if %{with python3} | |
113 | %files -n python3-pytest-runner | |
114 | %defattr(644,root,root,755) | |
115 | %doc CHANGES.txt README.txt | |
116 | %{py3_sitescriptdir}/ptr.py | |
117 | %{py3_sitescriptdir}/__pycache__/ptr.cpython-*.py[co] | |
118 | %{py3_sitescriptdir}/pytest_runner-%{version}-py*.egg-info | |
119 | %endif | |
120 | ||
121 | %if %{with doc} | |
122 | %files apidocs | |
123 | %defattr(644,root,root,755) | |
124 | %doc build/sphinx/html/* | |
125 | %endif |