[Grok-dev] Re: Using pygments in rest with rst2html

Sylvain Viollon sylvain at infrae.com
Mon Aug 4 04:29:27 EDT 2008


On Sun, 3 Aug 2008 19:00:25 +0200
"Vincent Fretin" <vincent.fretin at gmail.com> wrote:

  Hello,

> 
> Thanks, I easy_install-ed ulif.rest
> I edited bin/rst2html.py to include the three imports:
> from ulif.rest import directives_plain
> from ulif.rest import roles_plain
> from ulif.rest import pygments_directive # for syntax-highlighting
> support and I tested it:
> $ rst2html.py mydoc.rst > mydoc.html
> and it gave me :
> File
> "$[sandbox}/lib/python2.4/site-packages/docutils-0.4-py2.4.egg/docutils/parsers/rst/states.py",
> line 110, in ? import roman
> ImportError: No module named roman
> 
> Indeed roman.py module is nowhere, not in the virtualenv's
> site-packages, not in site-packages global directory.
> 

  That's a known bug of docutils packaging. Reinstall a second time
like you did and that's fine.

> Then I easy-installed docutils==0.5 and modified again bin/rst2html.py
> and it works. docutils 0.5 have the roman.py module.
> $ find lib/python2.4/site-packages/ -name roman.py
> lib/python2.4/site-packages/docutils-0.5-py2.4.egg/roman.py
> 
> The docutils dependency version should be updated to 0.5, and a new
> release of ulif.rest should be made, no?
> 

  No, if the version of docutils in ulif.rest is not binded to 0.4,
there is no major changes between this two version which will broke the
extension.


  Cheers,

  Sylvain,



-- 
Sylvain Viollon -- Infrae
t +31 10 243 7051 -- http://infrae.com
Hoevestraat 10 3033GC Rotterdam -- The Netherlands


More information about the Grok-dev mailing list