Files
tryton/doc/build.py
T

27 lines
846 B
Python
Raw Normal View History

2008-06-23 20:18:54 +02:00
#This file is part of Tryton. The COPYRIGHT file at the top level of this repository contains the full copyright notices and license terms.
# -*- coding: utf-8 -*-
import sys
import os
from os import path
from sphinx.util.console import nocolor
from sphinx.application import Sphinx
2008-06-19 08:49:20 +02:00
srcdir = confdir = path.abspath(path.normpath(path.dirname(__file__)))
outdir = os.path.join(srcdir, 'html')
static_dir = os.path.join(srcdir, 'static')
doctreedir = path.join(outdir, '.doctrees')
status = sys.stdout
2008-09-29 09:36:36 +02:00
confoverrides = {'html_file_suffix': '.html'}
freshenv = True
buildername = 'html'
if not path.isdir(outdir):
os.mkdir(outdir)
if not path.isdir(static_dir):
os.mkdir(static_dir)
nocolor()
app = Sphinx(srcdir, confdir, outdir, doctreedir, buildername,
2008-06-19 01:23:40 +02:00
confoverrides, status, sys.stderr, freshenv)
app.builder.build_all()