Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/bump_gmt_checklist.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ assignees: ''
**To-Do for bumping the minimum required GMT version**:

- [ ] Bump the minimum required GMT version (1 PR)
- [ ] Update `doc/install.rst`
- [ ] Update `required_version` in `pygmt/clib/session.py`
- [ ] Update `test_get_default` in `pygmt/tests/test_clib.py`
- [ ] Update compatibility table in `README.rst`
Expand Down
8 changes: 8 additions & 0 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@
# pylint: disable=invalid-name

import datetime
from importlib.metadata import metadata

# isort: off
from sphinx_gallery.sorting import ( # pylint: disable=no-name-in-module
ExplicitOrder,
ExampleTitleSortKey,
)
import pygmt
from pygmt import __commit__, __version__
from pygmt.sphinx_gallery import PyGMTScraper

Expand Down Expand Up @@ -149,9 +151,15 @@
html_baseurl = "https://pygmt.org/latest/"
release = __version__

requires_python = metadata("pygmt")["Requires-Python"]
with pygmt.clib.Session() as lib:
requires_gmt = ">=" + lib.required_version

# These enable substitutions using |variable| in the rst files
rst_epilog = f"""
.. |year| replace:: {year}
.. |requires_python| replace:: {requires_python}
.. |requires_gmt| replace:: {requires_gmt}
"""

html_last_updated_fmt = "%b %d, %Y"
Expand Down
11 changes: 4 additions & 7 deletions doc/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Start by looking at the tutorials on our sidebar, good luck!
Which Python?
-------------

PyGMT is tested to run on **Python 3.9 or greater**.
PyGMT is tested to run on Python |requires_python|.

We recommend using the `Mambaforge <https://github.com/conda-forge/miniforge#mambaforge>`__
Python distribution to ensure you have all dependencies installed and the
Expand All @@ -77,12 +77,9 @@ installations on your system.
Which GMT?
----------

PyGMT requires Generic Mapping Tools (GMT) version 6 as a minimum, which is the
latest released version that can be found at
the `GMT official site <https://www.generic-mapping-tools.org>`__.
We need the latest GMT (>=6.3.0) since there are many changes being made to GMT
itself in response to the development of PyGMT, mainly the new
:gmt-docs:`modern execution mode <cookbook/introduction.html#modern-and-classic-mode>`.
PyGMT requires Generic Mapping Tools (GMT) |requires_gmt| since there
are many changes being made to GMT itself in response to the development of PyGMT,
mainly the new :gmt-docs:`modern execution mode <cookbook/introduction.html#modern-and-classic-mode>`.

Compiled conda packages of GMT for Linux, macOS and Windows are provided
through `conda-forge <https://anaconda.org/conda-forge/gmt>`__.
Expand Down