don't use pytest-xdist in RHEL
Relates: https://github.com/fedora-eln/eln/issues/125 Related: rhbz#2208971
This commit is contained in:
parent
a7a8d6bda0
commit
0dd9e91f43
@ -2,9 +2,9 @@ Name: pyproject-rpm-macros
|
|||||||
Summary: RPM macros for PEP 517 Python packages
|
Summary: RPM macros for PEP 517 Python packages
|
||||||
License: MIT
|
License: MIT
|
||||||
|
|
||||||
# Disable tests on RHEL9 as to not pull in the test dependencies
|
%bcond tests 1
|
||||||
# Specify --with tests to run the tests e.g. on EPEL
|
# pytest-xdist is not available in RHEL
|
||||||
%bcond_with tests
|
%bcond pytest_xdist %{undefined rhel}
|
||||||
|
|
||||||
# The idea is to follow the spirit of semver
|
# The idea is to follow the spirit of semver
|
||||||
# Given version X.Y.Z:
|
# Given version X.Y.Z:
|
||||||
@ -49,7 +49,9 @@ BuildArch: noarch
|
|||||||
|
|
||||||
%if %{with tests}
|
%if %{with tests}
|
||||||
BuildRequires: python3dist(pytest)
|
BuildRequires: python3dist(pytest)
|
||||||
|
%if %{with pytest_xdist}
|
||||||
BuildRequires: python3dist(pytest-xdist)
|
BuildRequires: python3dist(pytest-xdist)
|
||||||
|
%endif
|
||||||
BuildRequires: python3dist(pyyaml)
|
BuildRequires: python3dist(pyyaml)
|
||||||
BuildRequires: python3dist(packaging)
|
BuildRequires: python3dist(packaging)
|
||||||
BuildRequires: python3dist(pip)
|
BuildRequires: python3dist(pip)
|
||||||
@ -130,7 +132,7 @@ test "$signature1" != ""
|
|||||||
|
|
||||||
%if %{with tests}
|
%if %{with tests}
|
||||||
export HOSTNAME="rpmbuild" # to speedup tox in network-less mock, see rhbz#1856356
|
export HOSTNAME="rpmbuild" # to speedup tox in network-less mock, see rhbz#1856356
|
||||||
%pytest -vv --doctest-modules -n auto
|
%pytest -vv --doctest-modules %{?with_pytest_xdist:-n auto}
|
||||||
|
|
||||||
# brp-compress is provided as an argument to get the right directory macro expansion
|
# brp-compress is provided as an argument to get the right directory macro expansion
|
||||||
%{python3} compare_mandata.py -f %{_rpmconfigdir}/brp-compress
|
%{python3} compare_mandata.py -f %{_rpmconfigdir}/brp-compress
|
||||||
|
Loading…
Reference in New Issue
Block a user