diff --git a/docs/conf.py b/docs/conf.py index b5b943acba85417dbae1dff6e893ce2f240f6833..548ec88c0d414d12a1ae04c164356b20a4da90f0 100755 --- a/docs/conf.py +++ b/docs/conf.py @@ -12,9 +12,15 @@ # import os import sys -sys.path.insert(0, os.path.abspath('../')) +if (os.environ.get("READTHEDOCS") == "True") is False: + sys.path.insert(0, os.path.abspath('..')) +else: + import site + p = site.getsitepackages()[0] + sys.path.insert(0, p) + # -- Project information ----------------------------------------------------- project = 'robust_speckle_tracking' diff --git a/docs/rtd_environment.yml b/docs/rtd_environment.yml index 4cc5081912be54d6a57a6f8e887a4a8b9b7b5551..0f28a7b59cc84201dcd413f97231df36c5202e83 100644 --- a/docs/rtd_environment.yml +++ b/docs/rtd_environment.yml @@ -2,7 +2,6 @@ name: rst channels: - conda-forge - defaults -channel_priority: strict dependencies: - cython - python=3.7 diff --git a/environment.yml b/environment.yml index 6c016dceaca7cd80de6d09bcab31fb06420f0f0a..677da42eda9c0a794008fd0f54aaff29b24ede60 100644 --- a/environment.yml +++ b/environment.yml @@ -2,7 +2,6 @@ name: rst channels: - conda-forge - defaults -channel_priority: strict dependencies: - cython - python=3.7 diff --git a/readthedocs.yml b/readthedocs.yml index b7e53ec6c295dc582975163a011fb0146d31f94e..8e2bb68e4cab5c654690f5dcec6d2180499ab800 100644 --- a/readthedocs.yml +++ b/readthedocs.yml @@ -1,19 +1,12 @@ # readthedocs.yml # Read the Docs configuration file # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details - -# Required -version: 2 - -# Build documentation in the docs/ directory with Sphinx -sphinx: - configuration: docs/conf.py +build: + image: latest conda: - environment: docs/rtd_environment.yml + environment: docs/rtd_environment.yml python: - version: 3.7 - install: - - method: setuptools - path: . \ No newline at end of file + version: 3.7 + setup_py_install: true \ No newline at end of file