From 703d32209ba49227edb67d7ca1c3107da6ca8ca5 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Tue, 28 Nov 2017 16:07:16 +0100 Subject: [PATCH 1/2] Don't define search path for includes and libs Compilers' and linkers' default search paths are fine on modern Linux. The custom search path was wrong on 32bit platforms anyway. When library_dirs is defined, distutils also adds rpath to the shared library. An rpath should not be added by default. I only commented out the configuration stanzes to keep them as example. Closes: https://github.com/python-ldap/python-ldap/issues/30 Signed-off-by: Christian Heimes --- setup.cfg | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/setup.cfg b/setup.cfg index 59816b7..7fab8ae 100644 --- a/setup.cfg +++ b/setup.cfg @@ -5,9 +5,10 @@ # for wrapping OpenLDAP 2 libs [_ldap] -# Define extra include and library dirs if needed -library_dirs = /usr/lib /usr/lib64 /usr/local/lib /usr/local/lib64 -include_dirs = /usr/include /usr/include/sasl /usr/local/include /usr/local/include/sasl +# Define extra include and library dirs if needed. distutils adds non +# standard library_dirs as rpath. +# library_dirs = /usr/lib /usr/lib64 /usr/local/lib /usr/local/lib64 +# include_dirs = /usr/include /usr/include/sasl /usr/local/include /usr/local/include/sasl # These defines needs OpenLDAP built with # ./configure --with-cyrus-sasl --with-tls From 5729d06ff5eda1e30858ffaf19e566e9b5283487 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Tue, 28 Nov 2017 16:24:07 +0100 Subject: [PATCH 2/2] Include sasl.h from standard path is the standard include path for sasl.h. ``pkg-config --cflags libsasl2`` agrees with me. Signed-off-by: Christian Heimes --- Modules/LDAPObject.c | 4 ---- setup.cfg | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/Modules/LDAPObject.c b/Modules/LDAPObject.c index 1c0591c..0aafe49 100644 --- a/Modules/LDAPObject.c +++ b/Modules/LDAPObject.c @@ -13,11 +13,7 @@ #include "options.h" #ifdef HAVE_SASL -#ifdef __APPLE__ #include -#else -#include -#endif #endif static void free_attrs(char***, PyObject*); diff --git a/setup.cfg b/setup.cfg index 7fab8ae..34699da 100644 --- a/setup.cfg +++ b/setup.cfg @@ -8,7 +8,7 @@ # Define extra include and library dirs if needed. distutils adds non # standard library_dirs as rpath. # library_dirs = /usr/lib /usr/lib64 /usr/local/lib /usr/local/lib64 -# include_dirs = /usr/include /usr/include/sasl /usr/local/include /usr/local/include/sasl +# include_dirs = /usr/include /usr/local/include # These defines needs OpenLDAP built with # ./configure --with-cyrus-sasl --with-tls