]> git.pld-linux.org Git - packages/python-pytest-runner.git/blob - python-pytest-runner.spec
rebuild with python 3.10
[packages/python-pytest-runner.git] / python-pytest-runner.spec
1 #
2 # Conditional build:
3 %bcond_without  doc     # Sphinx documentation
4 %bcond_with     tests   # unit tests
5 %bcond_without  python2 # CPython 2.x module
6 %bcond_without  python3 # CPython 3.x module
7
8 Summary:        Invoke py.test as distutils command with dependency resolution
9 Summary(pl.UTF-8):      Wywoływanie py.test jako polecenia distutils z rozwiązywaniem zależności
10 Name:           python-pytest-runner
11 # keep 5.2.x here for python2 support
12 Version:        5.2
13 Release:        2
14 License:        MIT
15 Group:          Libraries/Python
16 #Source0Download: https://pypi.org/simple/pytest-runner/
17 Source0:        https://files.pythonhosted.org/packages/source/p/pytest-runner/pytest-runner-%{version}.tar.gz
18 # Source0-md5:  e5f66b8e8e87f62c59631c35c919d321
19 URL:            https://github.com/pytest-dev/pytest-runner
20 %if %{with python2}
21 BuildRequires:  python-modules >= 1:2.7
22 BuildRequires:  python-setuptools >= 1:31.0.1
23 BuildRequires:  python-setuptools_scm >= 1.15.0
24 %if %{with tests}
25 BuildRequires:  python-pytest >= 3.5
26 BuildRequires:  python-pytest-black-multipy
27 BuildRequires:  python-pytest-cov
28 BuildRequires:  python-pytest-flake8
29 BuildRequires:  python-pytest-virtualenv
30 %endif
31 %endif
32 %if %{with python3}
33 BuildRequires:  python3-modules >= 1:3.2
34 BuildRequires:  python3-setuptools >= 1:31.0.1
35 BuildRequires:  python3-setuptools_scm >= 1.15.0
36 %if %{with tests}
37 BuildRequires:  python3-pytest >= 3.5
38 BuildRequires:  python3-pytest-black-multipy
39 BuildRequires:  python3-pytest-cov
40 BuildRequires:  python3-pytest-flake8
41 BuildRequires:  python3-pytest-virtualenv
42 %endif
43 %endif
44 %if %{with doc}
45 BuildRequires:  python-jaraco.packaging >= 3.2
46 BuildRequires:  python-rst.linker >= 1.9
47 BuildRequires:  sphinx-pdg-2
48 %endif
49 BuildRequires:  rpm-pythonprov
50 BuildRequires:  rpmbuild(macros) >= 1.714
51 Requires:       python-modules >= 1:2.7
52 BuildArch:      noarch
53 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
54
55 %description
56 Setup scripts can use pytest-runner to add setup.py test support for
57 pytest runner.
58
59 %description -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 -n python3-pytest-runner
64 Summary:        Invoke py.test as distutils command with dependency resolution
65 Summary(pl.UTF-8):      Wywoływanie py.test jako polecenia distutils z rozwiązywaniem zależności
66 Group:          Libraries/Python
67 Requires:       python3-modules >= 1:3.2
68
69 %description -n python3-pytest-runner
70 Setup scripts can use pytest-runner to add setup.py test support for
71 pytest runner.
72
73 %description -n python3-pytest-runner -l pl.UTF-8
74 Skrypty setup mogą wykorzystywać moduł pytest-runner do dodawania
75 obsługi testów pytest runnera w setup.py.
76
77 %package apidocs
78 Summary:        pytest-runner module documentation
79 Summary(pl.UTF-8):      Dokumentacja modułu pytest-runner
80 Group:          Documentation
81
82 %description apidocs
83 Documentation for pytest-runner module.
84
85 %description apidocs -l pl.UTF-8
86 Dokumentacja modułu pytest-runner.
87
88 %prep
89 %setup -q -n pytest-runner-%{version}
90
91 %build
92 %if %{with python2}
93 %py_build
94
95 %if %{with tests}
96 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
97 PYTEST_PLUGINS=pytest_black_multipy,pytest_cov.plugin,pytest_flake8,pytest_virtualenv \
98 %{__python} -m pytest ptr.py tests
99 %endif
100 %endif
101
102 %if %{with python3}
103 %py3_build
104
105 %if %{with tests}
106 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
107 PYTEST_PLUGINS=pytest_black_multipy,pytest_cov.plugin,pytest_flake8,pytest_virtualenv \
108 %{__python3} -m pytest ptr.py tests
109 %endif
110 %endif
111
112 %if %{with doc}
113 sphinx-build-2 -b html docs docs/build/html
114 %endif
115
116 %install
117 rm -rf $RPM_BUILD_ROOT
118
119 %if %{with python2}
120 %py_install
121
122 %py_postclean
123 %endif
124
125 %if %{with python3}
126 %py3_install
127 %endif
128
129 %clean
130 rm -rf $RPM_BUILD_ROOT
131
132 %if %{with python2}
133 %files
134 %defattr(644,root,root,755)
135 %doc CHANGES.rst LICENSE README.rst
136 %{py_sitescriptdir}/ptr.py[co]
137 %{py_sitescriptdir}/pytest_runner-%{version}-py*.egg-info
138 %endif
139
140 %if %{with python3}
141 %files -n python3-pytest-runner
142 %defattr(644,root,root,755)
143 %doc CHANGES.rst LICENSE README.rst
144 %{py3_sitescriptdir}/ptr.py
145 %{py3_sitescriptdir}/__pycache__/ptr.cpython-*.py[co]
146 %{py3_sitescriptdir}/pytest_runner-%{version}-py*.egg-info
147 %endif
148
149 %if %{with doc}
150 %files apidocs
151 %defattr(644,root,root,755)
152 %doc docs/build/html/{_static,*.html,*.js}
153 %endif
This page took 0.060031 seconds and 3 git commands to generate.