Commits

Anonymous committed 861fb39

Use correct Pygments in doc generation script and echo the version.

  • Participants
  • Parent commits 5f0a4bc
  • Branches trunk

Comments (0)

Files changed (1)

 
 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
 
     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