From 686099592fd209dc38052c4366fe76efa4481502 Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Tue, 23 May 2023 12:45:39 -0400 Subject: [PATCH] Avoid pytest-xdist in RHEL builds python-pytest-xdist is unwanted in RHEL due to its dependencies. --- python-tpm2-pytss.spec | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/python-tpm2-pytss.spec b/python-tpm2-pytss.spec index 7463d4f..2efca3f 100644 --- a/python-tpm2-pytss.spec +++ b/python-tpm2-pytss.spec @@ -13,7 +13,9 @@ Patch0: python-tpm2-pytss-1.2.0-openssl.patch BuildRequires: python3-devel BuildRequires: python3-pytest +%if %{undefined rhel} BuildRequires: python3-pytest-xdist +%endif BuildRequires: tpm2-tss-devel >= 2.0.0 BuildRequires: gcc # for tests @@ -58,7 +60,7 @@ Summary: %{summary} %pyproject_check_import # tests are very dependent on the python/openssl versions and fail at various places # The test test_tools_decode_tpms_nv_public fails on Fedora rawhide now -%pytest --import-mode=append -k "not test_tools_decode_tpms_nv_public" -n %{_smp_build_ncpus} +%pytest --import-mode=append -k "not test_tools_decode_tpms_nv_public" %{?!rhel:-n %{_smp_build_ncpus}} %files -n python3-%{pypi_name} -f %{pyproject_files}