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