GitHub - ecmwf/findlibs (original) (raw)

findlibs

A Python package that searches for shared libraries on various platforms.

Usage

import findlibs lib = findlibs.find("eccodes")

If package name differs from library name use:

lib = findlibs.find(lib_name="odccore", pkg_name="odc")

Installation

Testing

git clone https://github.com/ecmwf/findlibs cd findlibs pip install -e ".[test]" pytest

find

The module only contains the find() function.

def find(lib_name, pkg_name=None)

Returns the path to the selected library, or None if not found.

Arguments:

Returns:

str or None: Path to selected library

The algorithm to find the library is as follows:

[Paths]  
/path/to/lib_directory