Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2015-04-10 08:49:07 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-04-10 08:49:07 +0300
commit11a48b7227022df8154bec6583ad06ea9396725c (patch)
tree8bfedc5cfaacf6a6a33d2585e89b2984ed8a2495 /doc
parent40334b4920d6f43a6926eef32dda94555f84ead4 (diff)
Python API docs, don't hard-code sphinx themes
also set the theme to classic (as it was for 2.73)
Diffstat (limited to 'doc')
-rw-r--r--doc/python_api/sphinx_doc_gen.py38
1 files changed, 6 insertions, 32 deletions
diff --git a/doc/python_api/sphinx_doc_gen.py b/doc/python_api/sphinx_doc_gen.py
index 344e6769524..fab66d56a79 100644
--- a/doc/python_api/sphinx_doc_gen.py
+++ b/doc/python_api/sphinx_doc_gen.py
@@ -138,19 +138,9 @@ def handle_args():
parser.add_argument("-T", "--sphinx-theme",
dest="sphinx_theme",
type=str,
- default='default',
- help=
- # see SPHINX_THEMES below
- "Sphinx theme (default='default')\n"
- "Available themes\n"
- "----------------\n"
- "(Blender Foundation) blender-org\n" # naiad
- "(Sphinx) agogo, basic, epub, haiku, nature, "
- "scrolls, sphinxdoc, traditional\n",
-# choices=['naiad', 'blender-org'] + # bf
-# ['agogo', 'basic', 'epub',
-# 'haiku', 'nature', 'scrolls',
-# 'sphinxdoc', 'traditional'], # sphinx
+ default="classic",
+ help="Sphinx theme (default='classic'), "
+ "see: http://sphinx-doc.org/theming.html",
required=False)
parser.add_argument("-N", "--sphinx-named-output",
@@ -419,23 +409,7 @@ BLENDER_ZIP_FILENAME = "%s.zip" % REFERENCE_NAME
# -------------------------------SPHINX-----------------------------------------
-SPHINX_THEMES = {'bf': ['blender-org'], # , 'naiad',
- 'sphinx': ['agogo',
- 'basic',
- 'default',
- 'epub',
- 'haiku',
- 'nature',
- 'scrolls',
- 'sphinxdoc',
- 'traditional']}
-
-available_themes = SPHINX_THEMES['bf'] + SPHINX_THEMES['sphinx']
-if ARGS.sphinx_theme not in available_themes:
- print("Please choose a theme among: %s" % ', '.join(available_themes))
- sys.exit()
-
-if ARGS.sphinx_theme in SPHINX_THEMES['bf']:
+if ARGS.sphinx_theme == "blender-org":
SPHINX_THEME_DIR = os.path.join(ARGS.output_dir, ARGS.sphinx_theme)
SPHINX_THEME_SVN_DIR = os.path.join(SCRIPT_DIR, ARGS.sphinx_theme)
@@ -1572,7 +1546,7 @@ def write_sphinx_conf_py(basepath):
if ARGS.sphinx_theme != 'default':
fw("html_theme = '%s'\n" % ARGS.sphinx_theme)
- if ARGS.sphinx_theme in SPHINX_THEMES['bf']:
+ if ARGS.sphinx_theme == "blender-org":
fw("html_theme_path = ['../']\n")
# copied with the theme, exclude else we get an error [#28873]
fw("html_favicon = 'favicon.ico'\n") # in <theme>/static/
@@ -1987,7 +1961,7 @@ def main():
copy_function=shutil.copy)
# eventually, copy the theme dir
- if ARGS.sphinx_theme in SPHINX_THEMES['bf']:
+ if ARGS.sphinx_theme == "blender-org":
if os.path.exists(SPHINX_THEME_DIR):
shutil.rmtree(SPHINX_THEME_DIR, True)
shutil.copytree(SPHINX_THEME_SVN_DIR,