]> git.pld-linux.org Git - packages/python3-pytest.git/blame - python3-pytest.spec
- updated to 6.2.5
[packages/python3-pytest.git] / python3-pytest.spec
CommitLineData
bd571570
JB
1#
2# Conditional build:
3%bcond_without doc # HTML documentation build
08c08cc1 4%bcond_without python2 # CPython 2.x module
e4983238 5%bcond_without python3 # CPython 3.x module
65ffd36d 6%bcond_without tests # unit tests
e4983238 7
e4983238 8%define module pytest
bd571570
JB
9Summary: Simple and popular testing tool for Python
10Summary(pl.UTF-8): Proste i popularne narzędzie testujące dla Pythona
fe60a648 11Name: python3-%{module}
c9955928 12Version: 6.2.5
dcfaa027 13Release: 1
bd571570
JB
14License: MIT
15Group: Development/Languages/Python
65ffd36d 16#Source0Download: https://pypi.org/simple/pytest/
c4594506 17Source0: https://files.pythonhosted.org/packages/source/p/pytest/pytest-%{version}.tar.gz
c9955928 18# Source0-md5: 8bc467ebd5d571778dc51dd87ff09513
65ffd36d 19Patch0: %{name}-tests.patch
7359165f 20URL: https://pytest.org/
793efa43
JB
21BuildRequires: python3-devel >= 1:3.6
22BuildRequires: python3-modules >= 1:3.6
23BuildRequires: python3-py >= 1.8.2
24BuildRequires: python3-setuptools >= 1:42.0
25BuildRequires: python3-setuptools_scm >= 3.4
26BuildRequires: python3-toml
65ffd36d 27%if %{with tests}
793efa43 28BuildRequires: pydoc3 >= 1:3.6
aa356db6 29BuildRequires: python3-argcomplete
793efa43 30BuildRequires: python3-attrs >= 19.2.0
65ffd36d 31BuildRequires: python3-hypothesis >= 3.56
aa356db6
JB
32%if "%{py3_ver}" < "3.8"
33BuildRequires: python3-importlib_metadata >= 0.12
34%endif
793efa43 35BuildRequires: python3-iniconfig
65ffd36d 36BuildRequires: python3-nose
7359165f 37BuildRequires: python3-packaging
aa356db6 38BuildRequires: python3-pluggy >= 0.12
c9955928 39BuildRequires: python3-pluggy < 2.0
793efa43 40BuildRequires: python3-pygments >= 2.7.2
65ffd36d 41BuildRequires: python3-requests
fe60a648 42BuildRequires: python3-xmlschema
aa356db6 43BuildConflicts: python3-pytest-benchmark < 3.2.1
7359165f 44# outdated
65ffd36d 45BuildConflicts: python3-pytest-catchlog
7359165f 46# seems to break things
0537ae48 47BuildConflicts: python3-pytest-xdist
65ffd36d 48%endif
08c08cc1
JB
49BuildRequires: rpm-pythonprov
50BuildRequires: rpmbuild(macros) >= 1.714
51BuildRequires: sed >= 4.0
52%if %{with doc}
793efa43 53BuildRequires: python3-pallets-sphinx-themes
c9955928 54BuildRequires: python3-pluggy >= 1.0
793efa43 55BuildRequires: python3-pygments_pytest >= 1.1.0
7359165f 56BuildRequires: python3-sphinx_removed_in >= 0.2.0
65ffd36d 57BuildRequires: python3-sphinxcontrib-trio
793efa43 58BuildRequires: sphinx-pdg-3 >= 3.1
c9955928 59#BuildRequires: sphinx-pdg-3 < 4 (? doc/en/requirements.txt says so)
08c08cc1 60%endif
793efa43
JB
61Requires: python3-modules >= 1:3.6
62Requires: python3-setuptools >= 1:42.0
ddbe3b8a
JB
63Obsoletes: python3-pytest-cache < 1.1
64Obsoletes: python3-pytest-catchlog < 1.2.3
3c0bb99f 65Conflicts: python-pytest < 4.6.11-2
bd571570
JB
66BuildArch: noarch
67BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
68
69%description
70py.test is a simple and popular testing tool for Python.
71
72%description -l pl.UTF-8
73py.test to proste i popularne narzędzie testujące dla Pythona.
74
c4594506
JB
75%package apidocs
76Summary: Documentation for py.test Pythona package
77Summary(pl.UTF-8): Dokumentacja pakietu Pythona py.test
78Group: Documentation
79
80%description apidocs
81Documentation for py.test Pythona package.
82
83%description apidocs -l pl.UTF-8
84Dokumentacja pakietu Pythona py.test.
85
bd571570 86%prep
e4983238 87%setup -q -n %{module}-%{version}
65ffd36d 88%patch0 -p1
e4983238 89
bd571570 90%build
7359165f 91export PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
ac22139b 92%py3_build
65ffd36d
JB
93
94%if %{with tests}
9c502aa4
JB
95# test_pdb_custom_cls_with_settrace fails without preinstalled pytest
96# test_pdb_* which spawn pdb hang under some unclear conditions
3de7690a
JB
97# ...and most test_debugging tests require ptys
98# test_spawn_uses_tmphome and some terminal tests require ptys
65ffd36d 99PYTHONPATH=$(pwd)/src \
3de7690a 100%{__python3} -m pytest -k 'not (test_debugging or test_spawn_uses_tmphome or test_runtest_location_shown_before_test_starts or test_report_collect_after_half_a_second or test_trial_pdb)' testing
65ffd36d 101%endif
e4983238 102
bd571570 103%if %{with doc}
e4983238 104for l in doc/*; do
65ffd36d
JB
105 PYTHONPATH=$(pwd)/src \
106 %{__make} -C $l html \
107 SPHINXBUILD=sphinx-build-3
e4983238 108done
bd571570
JB
109%endif
110
111%install
112rm -rf $RPM_BUILD_ROOT
ac22139b 113
ac22139b 114%py3_install
84b7690d
JB
115
116%{__mv} $RPM_BUILD_ROOT%{_bindir}/py.test{,-3}
117%{__mv} $RPM_BUILD_ROOT%{_bindir}/pytest{,-3}
84b7690d 118
fe60a648
JB
119ln -sf py.test-3 $RPM_BUILD_ROOT%{_bindir}/py.test
120ln -sf pytest-3 $RPM_BUILD_ROOT%{_bindir}/pytest
bd571570
JB
121
122%clean
123rm -rf $RPM_BUILD_ROOT
124
125%files
126%defattr(644,root,root,755)
c4594506 127%doc AUTHORS CHANGELOG.rst LICENSE README.rst
bd571570 128%attr(755,root,root) %{_bindir}/py.test
84b7690d 129%attr(755,root,root) %{_bindir}/py.test-3
fe60a648 130%attr(755,root,root) %{_bindir}/pytest
84b7690d 131%attr(755,root,root) %{_bindir}/pytest-3
fe60a648 132%{py3_sitescriptdir}/pytest
e4983238 133%{py3_sitescriptdir}/_pytest
e4983238 134%{py3_sitescriptdir}/pytest-%{version}-py*.egg-info
c4594506
JB
135
136%if %{with doc}
137%files apidocs
138%defattr(644,root,root,755)
65ffd36d 139%doc doc/en/_build/html/{_images,_modules,_static,announce,example,proposals,*.html,*.js}
c4594506 140%endif
This page took 0.150566 seconds and 4 git commands to generate.