From d51f6c810c3e8462cc66ffa39413e3a2500444069e6acbab44398eb30a3ee1d3 Mon Sep 17 00:00:00 2001 From: Daniel Garcia Moreno Date: Tue, 20 Jan 2026 13:57:06 +0100 Subject: [PATCH] Don't use %pytest macro Do not use %pytest macro for running tests as it conflicts with internal .astropy/config --- python-pytest-arraydiff.changes | 6 ++++++ python-pytest-arraydiff.spec | 11 ++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/python-pytest-arraydiff.changes b/python-pytest-arraydiff.changes index f328a62..02f893b 100644 --- a/python-pytest-arraydiff.changes +++ b/python-pytest-arraydiff.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Jan 20 12:45:21 UTC 2026 - Daniel Garcia + +- Do not use %pytest macro for running tests as it conflicts with + internal .astropy/config + ------------------------------------------------------------------- Thu Dec 14 21:32:08 UTC 2023 - Dirk Müller diff --git a/python-pytest-arraydiff.spec b/python-pytest-arraydiff.spec index c02646b..1094c69 100644 --- a/python-pytest-arraydiff.spec +++ b/python-pytest-arraydiff.spec @@ -81,7 +81,16 @@ At the moment, the supported file formats for the reference files are: %check # not installed in :test multiflavor export PYTHONPATH="$PWD" -%pytest +BASEPATH=$PYTHONPATH + +# Don't run the tests with %%pytest macro as it sets the +# XDG_CONFIG_HOME env variable that conflicts with the .astropy/config +# folder. +export -n XDG_CONFIG_HOME +%{python_expand # +export PYTHONPATH=${BASEPATH}:%{buildroot}%{$python_sitelib} PYTHONDONTWRITEBYTECODE=1 +$python -m pytest -v +} %endif %if !%{with test}