diff --git a/Cython.spec b/Cython.spec index 5baee89..1e900eb 100644 --- a/Cython.spec +++ b/Cython.spec @@ -32,13 +32,17 @@ BuildRequires: python3-setuptools %if %{with tests} BuildRequires: gcc-c++ BuildRequires: python3-numpy +%if %{undefined rhel} # The tests requiring jedi are optional and skipped when jedi is not installed. # Note that the jedi tests were forcefully disabled a long time ago, # in https://github.com/cython/cython/issues/1845 far, far away. # We keep the dependency here so we don't forget to re-add it once the balance is restored. # We don't want to pull in jedi to RHEL just to potentially run more tests. -%if %{undefined rhel} BuildRequires: python3-jedi +# The pyximport functionality uses the removed imp module. +# It has been replaced by importlib in Cython 3. +# The reference counting regression test uses pyximport, so it is disabled in %%check on RHEL. +BuildRequires: (python3-zombie-imp if python3-devel >= 3.12) %endif %endif @@ -129,7 +133,7 @@ cp -p cython-mode-init.el cython-mode-init.elc %{buildroot}%{_emacs_sitestartdir %if %{with tests} %check # run.pstats_profile_test* fails on Python 3.12 -%{python3} runtests.py -vv --no-pyregr %{?_smp_mflags} \ +%{python3} runtests.py -vv --no-pyregr %{?rhel:--no-refnanny} %{?_smp_mflags} \ --exclude 'run.pstats_profile_test*' \ %ifarch %{ix86} --exclude run.parallel # https://github.com/cython/cython/issues/2807