Here's another interation of a patch I sent awhile ago (which was not 
adopted), but I think it's worth revisiting.

It fixes linking issues on boxes where 
1.  libpython lives somewhere != <prefix>/lib, 
2.  libpython includes sys.abiflags (new to python3).

-- Rex
diff -up PyQt-x11-gpl-4.8.2/configure.py.build_flags PyQt-x11-gpl-4.8.2/configure.py
--- PyQt-x11-gpl-4.8.2/configure.py.build_flags	2010-12-23 04:25:22.000000000 -0600
+++ PyQt-x11-gpl-4.8.2/configure.py	2010-12-30 13:01:04.388221449 -0600
@@ -925,16 +925,18 @@ include(%s)
             else:
                 # Use distutils to get the additional configuration.
                 from distutils.sysconfig import get_config_vars
+                from distutils.sysconfig import get_python_lib
                 ducfg = get_config_vars()
 
                 if sys.platform == "darwin":
                     # We need to work out how to specify the right framework
                     # version.
                     link = "-framework Python"
-                elif ("--enable-shared" in ducfg.get("CONFIG_ARGS", "") and
-                      glob.glob("%s/lib/libpython%d.%d*" % (ducfg["exec_prefix"], py_major, py_minor))):
-                    lib_dir_flag = quote("-L%s/lib" % ducfg["exec_prefix"])
-                    link = "%s -lpython%d.%d" % (lib_dir_flag, py_major, py_minor)
+                elif ("--enable-shared" in ducfg.get("CONFIG_ARGS", "") ):
+                    if hasattr(sys, 'abiflags'):
+                        link = "-L%s -lpython%s.%s%s" % (get_python_lib(plat_specific=1, standard_lib=1), py_major, py_minor, sys.abiflags)
+                    else:
+                        link = "-L%s -lpython%s.%s" % (get_python_lib(plat_specific=1, standard_lib=1), py_major, py_minor)
                 else:
                     sipconfig.inform("Qt Designer plugin disabled because Python library is static")
                     opts.designer_plugin = False

_______________________________________________
PyQt mailing list    [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to