FindLibs

0.1.2 · active · verified Sun Apr 12

FindLibs is a Python package designed to search for shared libraries across various platforms. It offers a robust search algorithm that includes checking Python module packages, system prefixes, environment variables, user-defined configuration files, and standard system paths. The current version is 0.1.2. It appears to be actively maintained by ECMWF, with regular updates and engagement on GitHub issues.

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to import the `find` function and use it to locate a shared library by its base name. The function returns the full path to the library if found, otherwise `None`. You can optionally provide `pkg_name` if the library is associated with a specific Python package name different from the library's base name.

from findlibs import find

# Example: Try to find a common library like 'eccodes'
# Replace 'eccodes' with a library relevant to your system if it's not found
lib_path = find("eccodes")
if lib_path:
    print(f"Found library at: {lib_path}")
else:
    print("Library not found.")

# You can also specify a package name if it differs from the library name
# lib_path_with_pkg = find("mylib", pkg_name="my_python_package")
# if lib_path_with_pkg:
#     print(f"Found 'mylib' via 'my_python_package' at: {lib_path_with_pkg}")

view raw JSON →