From 3df2cbdf32891237fee360e2003c2f659d08f63e Mon Sep 17 00:00:00 2001 From: Emmanuel Dreyfus Date: Fri, 7 Nov 2014 15:21:45 +0100 Subject: glupy: portability fixes Fixes portability problems so that NetBSD passes tests/features/glupy.t - Use python-config to detect python build environment on all systems, not just Linux and Darwin. - Get the site-package directory from python and make sure we install glupy.py there, Previously we installed within glusterfs prefix, which caused a problem if it was different that python's prefix. - Set PYTHONPATH for tests so that the detected site-packages is used in python's search path. This should be useless, but let us have it just in case. - Pass glupy.so path from glusterfsd to glupy.py through an environment variable and use it in CDLL instead of "", as the later seems not portable (at least it fails on NetBSD). - Use gil_init_key pthread_getspecific to avoid deadlocks (that code was #ifdef out, perhaps because it was not needed on Linux, but it seems to be required for NetBSD. - Recover the error message from Python and send it to the logs to help debugging problems. Backport of: http://review.gluster.org/8978 This is the same patchset as previously submitted to retrigger regression tests after a spurious failure. BUG: 1138897 Change-Id: I1e23ba5cc18f129ee1032f905cb053953b683a81 Signed-off-by: Emmanuel Dreyfus Reviewed-on: http://review.gluster.org/8980 Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- tests/features/glupy.t | 1 + 1 file changed, 1 insertion(+) (limited to 'tests/features') diff --git a/tests/features/glupy.t b/tests/features/glupy.t index a34e48ffec0..8b79a148d4d 100755 --- a/tests/features/glupy.t +++ b/tests/features/glupy.t @@ -3,6 +3,7 @@ . $(dirname $0)/../include.rc . $(dirname $0)/../volume.rc +echo $PYTHON_PATH >&2 cleanup; TEST mkdir -p $B0/glupytest -- cgit