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