diff options
author | gbrandl <devnull@localhost> | 2009-09-15 12:37:22 +0200 |
---|---|---|
committer | gbrandl <devnull@localhost> | 2009-09-15 12:37:22 +0200 |
commit | 0554bc94e9e129907db88409cfba57e0a29358af (patch) | |
tree | bc7cb3538577350b712fce03f49906300b6e30e0 /docs | |
parent | 36954be37ea3366e907d0606ae0849520372eb9b (diff) | |
download | pygments-0554bc94e9e129907db88409cfba57e0a29358af.tar.gz |
Use correct Pygments in doc generation script and echo the version.
Diffstat (limited to 'docs')
-rw-r--r-- | docs/generate.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/docs/generate.py b/docs/generate.py index 0fd90b94..436b79e1 100644 --- a/docs/generate.py +++ b/docs/generate.py @@ -22,7 +22,10 @@ from docutils.writers import html4css1 from jinja2 import Template -from pygments import highlight +# try to use the right Pygments to build the docs +sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..')) + +from pygments import highlight, __version__ from pygments.lexers import get_lexer_by_name from pygments.formatters import HtmlFormatter @@ -436,6 +439,9 @@ def run(handle_file, dst, sources=()): path = os.path.abspath(os.path.join(os.path.dirname(__file__), 'src')) if not sources: sources = [os.path.join(path, fn) for fn in os.listdir(path)] + if not os.path.isdir(dst): + os.makedirs(dst) + print 'Making docs for Pygments %s in %s' % (__version__, dst) for fn in sources: if not os.path.isfile(fn): continue |