[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyQt] patch to support non-default libdir
From:       Rex Dieter <rdieter () math ! unl ! edu>
Date:       2011-01-24 16:58:33
Message-ID: ihkb4n$vn5$1 () dough ! gmane ! org
[Download RAW message or body]

Rex Dieter wrote:

> On 01/21/2011 06:24 AM, Phil Thompson wrote:
>> On Thu, 20 Jan 2011 11:39:50 -0600, Rex Dieter<rdieter@math.unl.edu>
>> wrote:
>>> 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,

>> get_python_lib() doesn't return the directory containing libpython.
> 
> Heh, indeed you're right, we used to need this on fedora for some
> reason. Seems our libpython is in standard linker path, so the extra -L
> is indeed superfluous (though hard-coding <prefix>/lib is still wrong in
> our case, though I haven't got a better suggestion right now).

OK, here's an alternative implementation that looks @ LIBDIR in addition to 
searching exec_prefix/lib

-- Rex

["PyQt-x11-gpl-4.8.3-python_libdir.patch" (text/x-patch)]

diff -up PyQt-x11-gpl-4.8.3/configure.py.python_libdir \
                PyQt-x11-gpl-4.8.3/configure.py
--- PyQt-x11-gpl-4.8.3/configure.py.python_libdir	2011-01-23 04:08:20.000000000 -0600
+++ PyQt-x11-gpl-4.8.3/configure.py	2011-01-24 10:10:59.803217498 -0600
@@ -940,13 +940,15 @@ include(%s)
                     # 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"])
+                elif ("--enable-shared" in ducfg.get("CONFIG_ARGS", "")):
+                    if (glob.glob("%s/lib/libpython%d.%d*" % (ducfg["exec_prefix"], \
py_major, py_minor))): +                        lib_dir_flag = quote("-L%s/lib" % \
ducfg["exec_prefix"]) +                    elif (glob.glob("%s/libpython%d.%d*" % \
(ducfg["LIBDIR"], py_major, py_minor))): +                        lib_dir_flag = \
quote("-L%s" % ducfg["LIBDIR"]) +                    else:
+                        sipconfig.inform("Qt Designer plugin disabled because Python \
library is static") +                        opts.designer_plugin = False
                     link = "%s -lpython%d.%d%s" % (lib_dir_flag, py_major, py_minor, \
                abi)
-                else:
-                    sipconfig.inform("Qt Designer plugin disabled because Python \
                library is static")
-                    opts.designer_plugin = False
 
                 pysh_lib = ducfg["LDLIBRARY"]
 



_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic