[glom] Fix python library lookup on Windows
- From: Armin Burgmeier <arminb src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [glom] Fix python library lookup on Windows
- Date: Wed, 21 Oct 2009 18:35:54 +0000 (UTC)
commit bf60cdf8ac40e1e6b43308e96e732430cde7b52e
Author: Armin Burgmeier <armin arbur net>
Date: Wed Oct 21 20:32:52 2009 +0200
Fix python library lookup on Windows
2009-10-21 Armin Burgmeier <armin arbur net>
* macros/mm-python.m4: Fix the python library lookup on Windows: Avoid
a python error if get_config_var('LIBS') is None and include
$PREFIX/libs and $EXEC_PREFIX/libs in the search path because this is
where the official Python installer puts the library in.
ChangeLog | 7 +++++++
macros/mm-python.m4 | 7 ++++---
2 files changed, 11 insertions(+), 3 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 1a42abb..acd54d8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2009-10-21 Armin Burgmeier <armin arbur net>
+
+ * macros/mm-python.m4: Fix the python library lookup on Windows: Avoid
+ a python error if get_config_var('LIBS') is None and include
+ $PREFIX/libs and $EXEC_PREFIX/libs in the search path because this is
+ where the official Python installer puts the library in.
+
2009-10-19 David King <davidk openismus com>
* Makefile_libglom.am: Add missing backslash, fixing commit
diff --git a/macros/mm-python.m4 b/macros/mm-python.m4
index 835d813..77dbce5 100644
--- a/macros/mm-python.m4
+++ b/macros/mm-python.m4
@@ -23,7 +23,7 @@ m4_define([_MM_PYTHON_SYSCONFIG],
[dnl
mm_val=`$PYTHON -c "dnl
[import sys; from distutils import sysconfig; sys.stdout.write]dnl
-([sysconfig.]$1)" 2>&AS_MESSAGE_LOG_FD`
+([sysconfig.]$1 or '')" 2>&AS_MESSAGE_LOG_FD`
AS_IF([test "[$]?" -eq 0 && test "x$mm_val" != x], [$2], [$3])[]dnl
])
@@ -55,8 +55,9 @@ AS_IF([test "x$PYTHON_LIBS" = x],
[
_MM_PYTHON_SYSCONFIG([[get_config_var('LIBS')]], [PYTHON_LIBS=$mm_val])
set X
- _MM_PYTHON_SYSCONFIG([[EXEC_PREFIX]], [set "[$]@" "$mm_val/lib" "$mm_val/lib64"])
- _MM_PYTHON_SYSCONFIG([[PREFIX]], [set "[$]@" "$mm_val/lib" "$mm_val/lib64"])
+dnl On Windows the library is in libs/, not in lib/, so check there as well:
+ _MM_PYTHON_SYSCONFIG([[EXEC_PREFIX]], [set "[$]@" "$mm_val/lib" "$mm_val/libs" "$mm_val/lib64"])
+ _MM_PYTHON_SYSCONFIG([[PREFIX]], [set "[$]@" "$mm_val/lib" "$mm_val/libs" "$mm_val/lib64"])
_MM_PYTHON_SYSCONFIG([[get_python_lib(True, True)]], [set "[$]@" "$mm_val/config" "$mm_val"])
_MM_PYTHON_SYSCONFIG([[get_python_lib(False, True)]], [set "[$]@" "$mm_val/config" "$mm_val"])
shift
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]