Hello George,

El dg 22 de 01 del 2006 a les 21:30 +0000, en/na [EMAIL PROTECTED] va
escriure:
> Quoting Francesc Altet <[EMAIL PROTECTED]>:
> The patch seems to be in CVS. It didn't quite work. It needs an extra lib in 
> the 
> definition of libfile on line 91, and using libdir in the loop over lib and 
> lib64 seems to make libdir always true in the if statements on line 114 and 
> 126.

All right. I've modified this following your suggestions.

> The point of the libtypes stuff is that the break on line 100 now only 
> escapes 
> from the libdir/trydir loop, so it finds static and shared libraries ....
> Might as well make a virtue of a necessity.

Mmm, I'm not completely sure that finding all the static and dynamic
libraries would be a good idea. First, because in general, both static
and dynamic libraries are in the same directory. And second, even though
they would be in different directories, more logic would be needed in
order to select static or dynamic libs through the use of a new flag,
for example. For the time being, I've added just a new break to exit
from the extensions loop; I think this would be enough for now.

I'm adding the new patch. Please, have it a try again.

Cheers,

-- 
>0,0<   Francesc Altet     http://www.carabos.com/
V   V   Cárabos Coop. V.   Enjoy Data
 "-"

Index: setup.py
===================================================================
--- setup.py	(revision 1405)
+++ setup.py	(working copy)
@@ -87,8 +87,8 @@
     for instdir in lookup_directories:
         # ".dylib" is the extension for dynamic library for MacOSX
         for ext in ('.a', '.so', '.dylib'):
-            for libdir in ('lib/', 'lib64/'):
-                libfile = os.path.join(instdir, libdir+libname+ext)
+            for trydir in ('lib/', 'lib64/'):
+                libfile = os.path.join(instdir, trydir+'lib'+libname+ext)
                 if os.path.isfile(libfile):
                     libdir = os.path.dirname(libfile)
                     if warn:
@@ -98,6 +98,7 @@
                     if libdir not in ('/usr/lib','/usr/lib64'):
                         lib_dirs.append(libdir)
                     break
+            if libdir: break  # Exit from lib extensions loop
 
         headerfile = os.path.join(instdir, "include/"+headername)
         if os.path.isfile(headerfile):

Reply via email to