44import os
55import re
66
7- # If we are building locally, or the build on Read the Docs looks like a PR
8- # build, prefer to use the version of the theme in this repo, not the installed
9- # version of the theme.
10- def is_development_build ():
11- # PR builds have an interger version
12- re_version = re .compile (r'^[\d]+$' )
13- if 'READTHEDOCS' in os .environ :
14- version = os .environ .get ('READTHEDOCS_VERSION' , '' )
15- if re_version .match (version ):
16- return True
17- return False
18- return True
19-
20- if is_development_build ():
21- sys .path .insert (0 , os .path .abspath ('..' ))
7+ # Prefer to use the version of the theme in this repo
8+ # and not the installed version of the theme.
9+ sys .path .insert (0 , os .path .abspath ('..' ))
2210sys .path .append (os .path .abspath ('./demo/' ))
2311
2412import sphinx_rtd_theme
2513from sphinx .locale import _
2614
2715project = u'Read the Docs Sphinx Theme'
2816slug = re .sub (r'\W+' , '-' , project .lower ())
29- version = '0.5.0 '
30- release = '0.5.0 '
17+ version = '0.5.1 '
18+ release = '0.5.1 '
3119author = u'Dave Snider, Read the Docs, Inc. & contributors'
3220copyright = author
3321language = 'en'
@@ -52,8 +40,8 @@ def is_development_build():
5240pygments_style = 'default'
5341
5442intersphinx_mapping = {
55- 'rtd' : ('https://docs.readthedocs.io/en/latest /' , None ),
56- 'sphinx' : ('http ://www.sphinx-doc.org/en/stable/' , None ),
43+ 'rtd' : ('https://docs.readthedocs.io/en/stable /' , None ),
44+ 'sphinx' : ('https ://www.sphinx-doc.org/en/stable/' , None ),
5745}
5846
5947html_theme = 'sphinx_rtd_theme'
0 commit comments