diff --git a/ci/requirements/doc.yml b/ci/requirements/doc.yml index f2c09ed6fef..97488e7f581 100644 --- a/ci/requirements/doc.yml +++ b/ci/requirements/doc.yml @@ -6,7 +6,7 @@ dependencies: - python=3.7 - bottleneck - cartopy - - eccodes + - cfgrib - h5netcdf - ipykernel - ipython @@ -21,8 +21,5 @@ dependencies: - seaborn - sphinx - sphinx_rtd_theme + - xarray - zarr - - pip - - pip: - - cfgrib - diff --git a/doc/conf.py b/doc/conf.py index 65635353e93..11abda6bb63 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -15,10 +15,16 @@ import datetime import os +import pathlib import subprocess import sys from contextlib import suppress +# make sure the source version is preferred (#3567) +root = pathlib.Path(__file__).absolute().parent.parent +os.environ["PYTHONPATH"] = str(root) +sys.path.insert(0, str(root)) + import xarray allowed_failures = set() diff --git a/readthedocs.yml b/readthedocs.yml index 6429780e7d7..c64fa1b7b02 100644 --- a/readthedocs.yml +++ b/readthedocs.yml @@ -4,5 +4,5 @@ conda: file: ci/requirements/doc.yml python: version: 3.7 - setup_py_install: true + setup_py_install: false formats: []