From e90ea3cdad5e2fee7313ae66de5623409aae507f Mon Sep 17 00:00:00 2001 From: Ben Greiner Date: Fri, 20 Nov 2020 19:58:34 +0100 Subject: [PATCH] pytest: ignore _build dirs for all flavors --- macros/010-common-defs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/macros/010-common-defs b/macros/010-common-defs index f3dcbb6..70fba11 100644 --- a/macros/010-common-defs +++ b/macros/010-common-defs @@ -128,7 +128,8 @@ local args = rpm.expand("%**"); \ local broot = rpm.expand("%buildroot"); \ local intro = "%{python_expand PYTHONPATH=${PYTHONPATH:+$PYTHONPATH:}" .. broot .. "%{$python_sitelib} PYTHONDONTWRITEBYTECODE=1 "; \ - intro = intro .. "pytest-%{$python_bin_suffix} --ignore=_build.python2 --ignore=_build.python3 --ignore=_build.pypy3 -v "; \ + local ignore_build = "--ignore=_build." .. rpm.expand("%pythons"):gsub("%s+", " --ignore=_build."); \ + intro = intro .. "pytest-%{$python_bin_suffix} " .. ignore_build .. " -v "; \ print(rpm.expand(intro .. args .. "}")) \ } @@ -136,7 +137,8 @@ local args = rpm.expand("%**"); \ local broot = rpm.expand("%buildroot"); \ local intro = "%{python_expand PYTHONPATH=${PYTHONPATH:+$PYTHONPATH:}" .. broot .. "%{$python_sitearch} PYTHONDONTWRITEBYTECODE=1 "; \ - intro = intro .. "pytest-%{$python_bin_suffix} --ignore=_build.python2 --ignore=_build.python3 --ignore=_build.pypy3 -v "; \ + local ignore_build = "--ignore=_build." .. rpm.expand("%pythons"):gsub("%s+", " --ignore=_build."); \ + intro = intro .. "pytest-%{$python_bin_suffix} " .. ignore_build .. " -v "; \ print(rpm.expand(intro .. args .. "}")) \ }