Premiere version : mise en route du suivi.
[auf_roundup.git] / roundup / dist / command / .svn / text-base / build_doc.py.svn-base
CommitLineData
c638d827
CR
1#
2# Copyright (C) 2009 Stefan Seefeld
3# All rights reserved.
4# For license terms see the file COPYING.txt.
5#
6
7import os, sys
8from stat import *
9import os.path
10from shutil import *
11import glob
12
13from distutils.command import build
14from distutils.spawn import spawn, find_executable
15from distutils.dep_util import newer, newer_group
16from distutils.dir_util import copy_tree, remove_tree, mkpath
17from distutils.file_util import copy_file
18from distutils import sysconfig
19
20class build_doc(build.build):
21 """Defines the specific procedure to build roundup's documentation."""
22
23 description = "build documentation"
24
25 def run(self):
26 """Run this command, i.e. do the actual document generation."""
27
28 sphinx = find_executable('sphinx-build')
29 if not sphinx:
30 self.warn("could not find sphinx-build in PATH")
31 self.warn("cannot build documentation")
32 return
33
34 doc_dir = os.path.join('share', 'doc', 'roundup', 'html')
35 temp_dir = os.path.join(self.build_temp, 'doc')
36 cmd = [sphinx, '-d', temp_dir, 'doc', doc_dir]
37 spawn(cmd)