Skip to content

Commit

Permalink
Merge pull request #983 from esc/rtd_conf_v_2
Browse files Browse the repository at this point in the history
adding RTD conf file V2 as per request
  • Loading branch information
esc committed Sep 19, 2023
1 parent 6046dd6 commit 54aa676
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 31 deletions.
8 changes: 0 additions & 8 deletions docs/environment.yml

This file was deleted.

21 changes: 6 additions & 15 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,9 @@

import sys
import os
import shlex
from datetime import datetime

on_rtd = os.environ.get('READTHEDOCS') == 'True'
import sphinx_rtd_theme

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
Expand Down Expand Up @@ -58,9 +57,10 @@
copyright = '2015, Continuum Analytics'
author = 'Continuum Analytics'

if on_rtd:
if os.environ.get('READTHEDOCS'):
# RTD replaces the last update date. So we need to hack it in here.
copyright += '. Last updated on {}'.format(datetime.utcnow().strftime('%b %d, %Y'))
copyright += '. Last updated on {}'.format(
datetime.utcnow().strftime('%b %d, %Y'))

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
Expand Down Expand Up @@ -121,18 +121,9 @@

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'default'

# on_rtd is whether we are on readthedocs.org
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'

if not on_rtd:
# only import and set the theme if we're building docs locally
# otherwise, readthedocs.org uses their theme by default, so no need to specify it
import sphinx_rtd_theme
html_theme = 'sphinx_rtd_theme'
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]

html_theme = 'sphinx_rtd_theme'
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
Expand Down
5 changes: 0 additions & 5 deletions readthedocs.yml

This file was deleted.

3 changes: 0 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,6 @@ def _guard_py_ver():

_guard_py_ver()

if os.environ.get('READTHEDOCS', None) == 'True':
sys.exit("setup.py disabled on readthedocs: called with %s"
% (sys.argv,))

import versioneer

Expand Down

0 comments on commit 54aa676

Please sign in to comment.