%py3_test_envvars: Only set $PYTEST_XDIST_AUTO_NUM_WORKERS if not already set

This commit is contained in:
Miro Hrončok 2023-01-18 16:36:05 +01:00
commit b2f798fc81
4 changed files with 8 additions and 5 deletions

View file

@ -169,7 +169,7 @@ print(_python_macro_cache[cache_key][name])
PYTHONPATH="${PYTHONPATH:-%{buildroot}%{python_sitearch}:%{buildroot}%{python_sitelib}}"\\\
PYTHONDONTWRITEBYTECODE=1\\\
%{?__pytest_addopts:PYTEST_ADDOPTS="${PYTEST_ADDOPTS:-} %{__pytest_addopts}"}\\\
PYTEST_XDIST_AUTO_NUM_WORKERS=%{_smp_build_ncpus}}
PYTEST_XDIST_AUTO_NUM_WORKERS="${PYTEST_XDIST_AUTO_NUM_WORKERS:-%{_smp_build_ncpus}}"}
%python_disable_dependency_generator() \
%undefine __pythondist_requires \