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