From 8aecb213ce3033036a2f1ee5d44a7919bf9a7692 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 6 Oct 2025 19:28:01 +0200 Subject: [PATCH] Exclude python3-wxpython4 build dependency on RHEL/ELN Fixes https://github.com/fedora-eln/eln/issues/329 --- python-enchant.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/python-enchant.spec b/python-enchant.spec index 67b7cc3..8809ffe 100644 --- a/python-enchant.spec +++ b/python-enchant.spec @@ -13,8 +13,10 @@ BuildArch: noarch BuildRequires: enchant2 BuildRequires: python3-devel +%if %{undefined rhel} # For importing the wxSpellCheckerDialog module BuildRequires: python3-wxpython4 +%endif %description PyEnchant is a spellchecking library for Python, based on the Enchant @@ -46,8 +48,9 @@ library by Dom Lachowicz. # Tests are not included in the upstream tarball %check # We exclude testing of the import for the GtkSpellCheckerDialog -# as it utilizes the legacy PyGTK bindings -%pyproject_check_import -e '*.GtkSpellCheckerDialog' +# as it utilizes the legacy PyGTK bindings. +# On RHEL, we also exclude wx to avoid it as a dependency. +%pyproject_check_import -e '*.GtkSpellCheckerDialog' %{?rhel:-e '*.wxSpellCheckerDialog'} %files -n python3-%{srcname} -f %{pyproject_files} %doc README.rst