CI tests: Workaround python-ldap missing support fro OpenLDAP 2.5+

Related: rhbz#2060109
This commit is contained in:
Miro Hrončok 2022-02-22 19:49:52 +00:00
parent 600c6d59a7
commit 3c5fe19ca1
1 changed files with 11 additions and 0 deletions

View File

@ -5,6 +5,11 @@ License: Python
Summary: An object-oriented API to access LDAP directory servers
Source0: %{pypi_source}
# OpenLDAP 2.5+ is not yet supported by python-ldap
# https://github.com/python-ldap/python-ldap/issues/432
# Fedora has this patch to make it build, but the tests will fail anyway
Patch0: https://src.fedoraproject.org/rpms/python-ldap/raw/a237d9b212bd1581e07f4f1a8f54c26a7190843c/f/python-ldap-always-use-ldap-library.patch
BuildRequires: python3-devel
BuildRequires: pyproject-rpm-macros
@ -35,6 +40,12 @@ Summary: %{summary}
%prep
%autosetup
%if 0%{?fedora} >= 36 || 0%{?rhel} >= 10
# Hack: We remove tests that are broken by OpenLDAP 2.5+
# Don't do this in the regular Fedora package, please
rm Tests/t_ldapobject.py Tests/t_cext.py Tests/t_edit.py Tests/t_ldap_sasl.py Tests/t_ldap_syncrepl.py Tests/t_slapdobject.py Tests/t_bind.py Tests/t_ldap_options.py Tests/t_ldap_schema_subentry.py
%endif
%generate_buildrequires
%pyproject_buildrequires -t