cython - Python: pyximporting a pyx that depends on a native library -
my pyx depends upon native library
how can pyximport.install()
it? auto-build in pyxinstall doesn't know link native library, build fails...
you can still export correct ldflags / cflags before doing pyximport.install() :
from os import environ environ['cflags'] = '-i/path/to/my/custom/lib' environ['ldflags'] = '-lpath/to/my/custom/lib -lcustomlib' import pyximport pyximport.install()
however, pyximport should used in debug case. prefer setup.py method !
Comments
Post a Comment