aliles/filemagic — pull request #2 by erhudy (2012-12-12 21:58:03+00:00)
Title: patch for filemagic on Solaris

I was working on getting filemagic set up on some Solaris servers and found that ctypes.util.find_library does not appear to work on Solaris, even on the most recent version of Python 2.7 (doing something like ctypes.util.find_library('c') returns None when you'd obviously expect it to return something there), and thusly filemagic won't work since it doesn't know that the library does exist. I made a little patch to magic/api.py that checks the operating system and uses dl.open to test for the presence of libmagic.so if the OS is SunOS.