George,

I think the attached patch would be an 'elegant' enough solution.
Please, check if it works for you.

Thanks for point out this.

A Dijous 19 Gener 2006 19:50, George Nurser va escriure:
> Hope this may be useful to somebody. I had a problem getting pytables
> to find the bz2 library.
>
> On our Sun Opteron linux box, a lot of stuff, including the bz2
> library, is in various lib64 instead of in lib.
>
> I got pytables to find it when setting up by modifying setup.py to
> look first in lib64 as follows:
>
> after line 90: add
>              lib64file = os.path.join(instdir, "lib64/lib"+libname+ext)
> replace (old) line 91:
>              if os.path.isfile(libfile):
> by:
>              if os.path.isfile(lib64file):
>                  libdir = os.path.dirname(lib64file)
>                  if warn:
>                      print "Found "+libname.upper()+" library at " +
> libdir
>                  # If library is in /usr
>                  # they should be already available on search paths
>                  if libdir not in ('/usr/lib',):
>                      lib_dirs.append(libdir)
>                  break
>              elif os.path.isfile(libfile):
>
>
> I'm sure there are far more elegant ways of doing this though.
>
> --George Nurser.
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log
> files for problems?  Stop!  Download the new AJAX search engine that makes
> searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
> _______________________________________________
> Pytables-users mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/pytables-users

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

Index: setup.py
===================================================================
--- setup.py	(revision 1402)
+++ setup.py	(working copy)
@@ -87,16 +87,17 @@
     for instdir in lookup_directories:
         # ".dylib" is the extension for dynamic library for MacOSX
         for ext in ('.a', '.so', '.dylib'):
-            libfile = os.path.join(instdir, "lib/lib"+libname+ext)
-            if os.path.isfile(libfile):
-                libdir = os.path.dirname(libfile)
-                if warn:
-                    print "Found "+libname.upper()+" library at " + libdir
-                # If library is in /usr
-                # they should be already available on search paths
-                if libdir not in ('/usr/lib',):
-                    lib_dirs.append(libdir)
-                break
+            for libdir in ('lib/', 'lib64/'):
+                libfile = os.path.join(instdir, libdir+libname+ext)
+                if os.path.isfile(libfile):
+                    libdir = os.path.dirname(libfile)
+                    if warn:
+                        print "Found "+libname.upper()+" library at " + libdir
+                    # If library is in /usr
+                    # they should be already available on search paths
+                    if libdir not in ('/usr/lib','/usr/lib64'):
+                        lib_dirs.append(libdir)
+                    break
 
         headerfile = os.path.join(instdir, "include/"+headername)
         if os.path.isfile(headerfile):

Reply via email to