File: build_html_brian2.py

package info (click to toggle)
brian 2.9.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,872 kB
  • sloc: python: 51,820; cpp: 2,033; makefile: 108; sh: 72
file content (17 lines) | stat: -rw-r--r-- 657 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import os
import shutil
import sphinx
if not sphinx.version_info >= (1, 8):
    raise ImportError('Need sphinx version 1.8')
from sphinx.cmd.build import main as sphinx_main
import sys

os.chdir(os.path.join(os.path.dirname(__file__), '../../../docs_sphinx'))
if os.path.exists('../docs'):
    shutil.rmtree('../docs')
# Some code (e.g. the definition of preferences) might need to know that Brian
# is used to build the documentation. The READTHEDOCS variable is set
# on the readthedocs.io server automatically, so we reuse it here to signal
# a documentation build
os.environ['READTHEDOCS'] = 'True'
sys.exit(sphinx_main(['-b', 'html', '.', '../docs']))