doc/runrst
changeset 39472 4e4fae1dda5c
parent 28076 18c6b271579b
child 43690 15cccbacd5ce
--- a/doc/runrst	Sun Aug 26 22:18:09 2018 +0900
+++ b/doc/runrst	Thu Sep 06 22:12:21 2018 +0900
@@ -12,11 +12,14 @@
 where WRITER is the name of a Docutils writer such as 'html' or 'manpage'
 """
 
+from __future__ import absolute_import
+
 import sys
 try:
-    from docutils.parsers.rst import roles
-    from docutils.core import publish_cmdline
-    from docutils import nodes, utils
+    import docutils.core as core
+    import docutils.nodes as nodes
+    import docutils.utils as utils
+    import docutils.parsers.rst.roles as roles
 except ImportError:
     sys.stderr.write("abort: couldn't generate documentation: docutils "
                      "module is missing\n")
@@ -58,4 +61,4 @@
     writer = sys.argv[1]
     del sys.argv[1]
 
-    publish_cmdline(writer_name=writer)
+    core.publish_cmdline(writer_name=writer)