def _library_path(self):
<EOL>if os.path.isfile(self.engine):<EOL><INDENT>return self.engine<EOL><DEDENT>pathname = '<STR_LIT>'<EOL>separator = '<STR_LIT::>'<EOL>if platform.system() == '<STR_LIT>':<EOL><INDENT>pathname = '<STR_LIT>'<EOL>separator = '<STR_LIT::>'<EOL><DEDENT>if platform.system() == '<STR_LIT>':<EOL><INDENT>pathname = '<STR_LIT>'<EOL>separator = '<STR_LIT:;>'<EOL><DEDENT>lib_path_from_environment = os.environ.get(pathname, '<STR_LIT>')<EOL>if lib_path_from_environment:<EOL><INDENT>known_paths = [<EOL>path for path in lib_path_from_environment.split(separator)] + self.known_paths<EOL><DEDENT>else:<EOL><INDENT>known_paths = self.known_paths<EOL><DEDENT>known_paths = [os.path.expanduser(path) for path in known_paths]<EOL>possible_libraries = [os.path.join(path, self._libname())<EOL>for path in known_paths]<EOL>for library in possible_libraries:<EOL><INDENT>if os.path.exists(library):<EOL><INDENT>logger.info("<STR_LIT>", library)<EOL>return library<EOL><DEDENT><DEDENT>msg = "<STR_LIT>" % '<STR_LIT:U+002CU+0020>'.join(possible_libraries)<EOL>raise RuntimeError(msg)<EOL>
Return full path to the shared library.

        A couple of regular unix paths like ``/usr/lib/`` is searched by
        default. If your library is not in one of those, set a
        ``LD_LIBRARY_PATH`` environment variable to the directory with your
        shared library.

        If the library cannot be found, a ``RuntimeError`` with debug
        information is raised.