Skip to content

Commit

Permalink
add xESMF workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
Zeitsperre committed Sep 15, 2023
1 parent b8d0061 commit 6c5b890
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,20 @@
# directory, add these directories to sys.path here. If the directory is
# relative to the documentation root, use os.path.abspath to make it
# absolute, like shown here.
#
from pathlib import Path

import os
import sys
sys.path.insert(0, os.path.abspath('..'))

import xhydro
import xhydro # noqa


if os.environ.get("READTHEDOCS") and "ESMFMKFILE" not in os.environ:
# RTD doesn't activate the env, and esmpy depends on an env var set there
# We assume the `os` package is in {ENV}/lib/pythonX.X/os.py
# See conda-forge/esmf-feedstock#91 and readthedocs/readthedocs.org#4067
os.environ["ESMFMKFILE"] = str(Path(os.__file__).parent.parent / "esmf.mk")

# -- General configuration ---------------------------------------------

Expand Down

0 comments on commit 6c5b890

Please sign in to comment.