ELIFE-ASU / PyInform

A Python Wrapper for the Inform Information Analysis Library
https://elife-asu.github.io/PyInform
MIT License
45 stars 9 forks source link

OS X Support #8

Closed dglmoore closed 7 years ago

dglmoore commented 7 years ago

Add support for OS X binaries releases of inform.

Proposed Changes

Support for OS X should be as simple as checking the platform and setting the shared library path in pyinform/__init__.py. Simply adding a branch for "Darwin" should do the trick:

if system() == 'Linux':
    return "{}/lib/libinform.so.{}.{}.{}".format(libdir,major,minor,revision)
elif system() == 'Darwin':
    return "{}/lib/libinform.{}.{}.{}.dylib".format(libdir,major,minor,revision)
elif system() == 'Windows':
    return "{}/lib/inform.dll".format(libdir)
else:
    raise RuntimeError("unsupported platform - \"{}\"".format(system()))