open-quantum-safe / liboqs-python

Python 3 bindings for liboqs
https://openquantumsafe.org/
MIT License
108 stars 39 forks source link

Improve lib loading #2

Closed christianpaquin closed 5 years ago

christianpaquin commented 5 years ago

Improve library loading in the wrapper, following @truth-quark's review suggestion: "several platform specific default paths could be hard coded & checked. Failing that, I'd check for an environment variable & exit neatly if nothing exists"

truth-quark commented 5 years ago

For reference, ctypes has funcs for finding shared objs: https://docs.python.org/3.6/library/ctypes.html?highlight=ctype#finding-shared-libraries Specifically: ctypes.util.find_library(name)

truth-quark commented 5 years ago

Implemented in https://github.com/open-quantum-safe/liboqs-python/pull/4.