changeset 16611:462dd183bd73 stable

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.
author Nikolaj Sjujskij <sterkrig@myopera.com>
date Tue, 08 May 2012 23:59:39 +0400
parents d36a384bec87
children bc84a1aeaf5a
files doc/hgmanpage.py
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/doc/hgmanpage.py	Sat May 05 12:21:22 2012 +0200
+++ b/doc/hgmanpage.py	Tue May 08 23:59:39 2012 +0400
@@ -47,7 +47,10 @@
 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