[nautilus-python: 1/2] From Python 3.8 and onwards C extensions are no longer linked to libpython so in order to embed pyth



commit ddb29f5b176e04488c651f7e8d575fd309fc0697
Author: Charalampos Stratakis <cstratak redhat com>
Date:   Mon Jun 10 15:55:53 2019 +0200

    From Python 3.8 and onwards C extensions are no longer
    linked to libpython so in order to embed python within
    an application the --embed flag needs to be added to
    python3-config --libs. A fall back is provided as the
    command will error out on previous python versions.
    
    References: https://bugs.python.org/issue36721

 m4/python.m4 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/m4/python.m4 b/m4/python.m4
index ebacfb2..549676e 100644
--- a/m4/python.m4
+++ b/m4/python.m4
@@ -140,7 +140,7 @@ py_lib_name=`basename $py_include_path`
 if test "x$PYTHON_LIBS" = x; then
   PYTHON_CONFIG=`which $PYTHON`-config
   if test -x "$PYTHON_CONFIG"; then
-    PYTHON_LIBS=`$PYTHON_CONFIG --ldflags 2>/dev/null`
+    PYTHON_LIBS=`$PYTHON_CONFIG --libs --embed 2>/dev/null` || PYTHON_LIBS=`$PYTHON_CONFIG --libs  
2>/dev/null`
   else
     PYTHON_LIBS="-L${py_prefix}/lib -lpython${PYTHON_VERSION}"
   fi


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]