# HG changeset patch # User Nikolaj Sjujskij # Date 2012-05-08 19:59:39 # Node ID 462dd183bd73beb9bb17ec73e8fbebb143167f4e # Parent d36a384bec8743f7c27d85f6a3baa759aba57425 build: fix hgrc manpage building with docutils 0.9 Since docutils 0.9, `roman` module has been moved from module directory root (i.e. `site-packages/roman.py`) to `docutils.utils` module. Therefore `import roman` statement should be wrapped in `try: ... except ImportError: ...` block to handle importing correctly. diff --git a/doc/hgmanpage.py b/doc/hgmanpage.py --- a/doc/hgmanpage.py +++ b/doc/hgmanpage.py @@ -47,7 +47,10 @@ by the command whatis or apropos. import re from docutils import nodes, writers, languages -import roman +try: + import roman +except ImportError: + from docutils.utils import roman import inspect FIELD_LIST_INDENT = 7