Skip to content

Find the GMT library by calling "gmt --show-library" #628

Closed
@seisman

Description

@seisman

Description of the desired feature

Currently, PyGMT first checks if the environmental variable GMT_LIBRARY_PATH is defined. If yes, it tries to find the GMT library in the specified path. Otherwise, it will search for the GMT library in standard library paths (LD_LIBRARY_PATH on Linux; DYLD_LIBRARY_PATH on macOS; PATH on Windows, if I understand it correctly).

As mentioned in GenericMappingTools/gmt#4241 (comment), gmt --show-library can return the full path of the GMT library. It can help find the GMT library especially when GMT is not installed via conda. Then the search order would be:

  1. GMT_LIBRARY_PATH if defined
  2. Full path returned by gmt --show-library
  3. System-wide standard library paths

Are you willing to help implement and maintain this feature? Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementImproving an existing feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions