]> granicus.if.org Git - zziplib/commitdiff
docs: more carefully handle relative module imports
authorPatrick Steinhardt <ps@pks.im>
Thu, 23 May 2019 20:15:31 +0000 (22:15 +0200)
committerPatrick Steinhardt <ps@pks.im>
Thu, 1 Aug 2019 08:14:04 +0000 (10:14 +0200)
The way how relative module imports are handled has changed with Python
3, causing it to throw exceptions when we try to import zzipdoc.*
modules.

Fix this by specifying the base module from which we import fo fix
compatibility with Python 3.

docs/zzipdoc/commentmarkup.py
docs/zzipdoc/dbk2htm.py
docs/zzipdoc/docbookdocument.py
docs/zzipdoc/functionheader.py
docs/zzipdoc/functionlisthtmlpage.py
docs/zzipdoc/functionlistreference.py
docs/zzipdoc/functionprototype.py
docs/zzipdoc/htm2dbk.py
docs/zzipdoc/htmldocument.py
docs/zzipdoc/options.py
docs/zzipdoc/textfileheader.py

index 3f605a72d6c5283683f36898a899948f609d93d3..71803e04ee4a4de559ab87923c108eaecebe3d8e 100644 (file)
@@ -1,4 +1,4 @@
-from match import Match
+from zzipdoc.match import Match
 
 def markup_link_syntax(text):
     """ markup the link-syntax ` => somewhere ` in the text block """
index f8593e697b05c593863eb3c7782038e5c13e8217..42d95b17d7063e1527b3b1c6a85ef20ec533d9f7 100644 (file)
@@ -1,4 +1,4 @@
-from match import Match
+from zzipdoc.match import Match
 import string
 
 class dbk2htm_conversion:
index c4602ad64d38e1693873cf621264bbc10573c374..ea0dfdc998cc5e0fd03f89be4e19932e316c4743 100644 (file)
@@ -1,6 +1,6 @@
 #! /usr/bin/env python
 # -*- coding: UTF-8 -*-
-from match import Match
+from zzipdoc.match import Match
 
 class DocbookDocument:
     """ binds some xml content page with additional markup - in this
index 81bb385c408aa1b814075407283acb4a29ccc023..7020b281c99cfa6a27fd28071e8bde8ab430555d 100644 (file)
@@ -1,4 +1,4 @@
-from match import Match
+from zzipdoc.match import Match
 
 class FunctionHeader:
     """ parsing the comment block that is usually presented before
index 4ec9178ca10ee2ad593246692fd144945684250b..b6310837cf6266695d7880437b12c0c3401093c4 100644 (file)
@@ -1,5 +1,5 @@
-from options import *
-from match import Match
+from zzipdoc.options import *
+from zzipdoc.match import Match
 
 class FunctionListHtmlPage:
     """ The main part here is to create a TOC (table of contents) at the
index c38ff0a3d80191d623396124f076cf200df82f7b..50531104918735390bb5f0ebe7ebd8a37d18e64a 100644 (file)
@@ -1,7 +1,7 @@
 #! /usr/bin/env python
 # -*- coding: UTF-8 -*-
-from match import Match
-from htm2dbk import *
+from zzipdoc.match import Match
+from zzipdoc.htm2dbk import *
 
 class FunctionListReference:
     """ Creating a docbook-style <reference> list of <refentry> parts
index fda85bb31174c1849ff10e13a94b8ab4e6f4ee58..23a107680cf16a67619d895c9c0ef0c418689958 100644 (file)
@@ -1,4 +1,4 @@
-from match import Match
+from zzipdoc.match import Match
 
 class FunctionPrototype:
     """ takes a single function prototype line (cut from some source file)
index 816a69586ef88747aaa8c9aa642b07dcce16326c..18ffe5982268323e38eead95ba4f9d7e8bfb1b32 100644 (file)
@@ -7,10 +7,10 @@ want is the docbook-to-pdf converter and similar technology being
 present in the world of docbook-to-anything converters. """
 
 from datetime import date
-import match
+from zzipdoc.match import Match
 import sys
 
-m = match.Match
+m = Match
 
 class htm2dbk_conversion_base:
     regexlist = [
index 47d58dc6ad2157e78f67f9352264385d2b12790d..be355913268dc70b83f1ed82ea4bc6aed4a9fa4c 100644 (file)
@@ -1,6 +1,6 @@
 #! /usr/bin/env python
 # -*- coding: UTF-8 -*-
-from match import Match
+from zzipdoc.match import Match
 
 class HtmlDocument:
     """ binds some html content page with additional markup - in this
index c6758d5fabfdb9ae5a9ca0f3b58d2cc949a881a6..d2a3e9f8a5c0f9f79a633ca001744c7f350d9853 100644 (file)
@@ -3,7 +3,7 @@
 # @creator (C) 2003 Guido U. Draheim
 # @license http://creativecommons.org/licenses/by-nc-sa/2.0/de/
 
-from match import Match
+from zzipdoc.match import Match
 
 # use as o.optionname to check for commandline options.
 class Options:
index ceaa28e99084abd03a359a35a5ace10ae9840f07..c73724320446f616fd26580d04a2036611f80a31 100644 (file)
@@ -1,4 +1,4 @@
-from match import Match
+from zzipdoc.match import Match
 
 class TextFileHeader:
     """ scan for a comment block at the source file start and fill the