Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update GMT constant GMT_STR16 to GMT_VF_LEN for GMT API change in 6.1…
….0 (#397) PyGMT fails with the latest GMT master branch with the following error message: ``` GMTCLibError: Constant 'GMT_STR16' doesn't exits in libgmt. ``` To reproduce the issue, you can run: ``` import pygmt fig = pygmt.Figure() fig.basemap(region='0/10/0/10', projection='X10c', frame=True) fig.plot(x=5, y=5, style='c0.2c') ``` The error is caused by the recent change of the length of virtual file names from `GMT_STR16` to `GMT_VF_LEN` in the core GMT (see GenericMappingTools/gmt#2861). Changing `GMT_STR16` to `GMT_VF_LEN` is the easiest fix. To keep compatibility with both GMT 6.0.0 and the upcomming 6.1.0, this PR checks GMT version and use `GMT_STR16` for 6.0.0, otherwise use `GMT_VF_LEN`.
- Loading branch information