mengyao / Complete-Striped-Smith-Waterman-Library

299 stars 113 forks source link

ctypes doesn't load relative path on OS X #28

Closed duxan closed 2 years ago

duxan commented 8 years ago

After make and appending /src to sys.path in python script I get:

OSError: dlopen(libssw.so, 6): image not found

In script I have:

import sys
sys.path.append('/Users/duxan/apps/Complete-Striped-Smith-Waterman-Library/src')
from ssw_wrap import Aligner

I have resolved it by putting absolute path in ssw_wrap.py, or it could be done with os.path.dirname(__file__) + '/libssw.so'

Would it be safe to implement this solution with os as platform independent?