]> granicus.if.org Git - zziplib/commitdiff
update to python3 in docs/*
authorGuido Draheim <guidod@gmx.de>
Mon, 13 Apr 2020 10:47:25 +0000 (12:47 +0200)
committerGuido Draheim <guidod@gmx.de>
Mon, 13 Apr 2020 10:47:41 +0000 (12:47 +0200)
docs/CMakeLists.txt
docs/cpp2markdown-1.py
docs/dbk2man.py
docs/dir2index.py
docs/make-doc.py
docs/makedocs.py
docs/zzipdoc/docbookdocument.py
docs/zzipdoc/htm2dbk.py
docs/zzipdoc/htmldocument.py

index 9707173fbafbf63e62dae67706aeb7161080146a..57d90009fece5b7766f89e8b035b279dea717fe9 100644 (file)
@@ -13,7 +13,7 @@ option(MSVC_STATIC_RUNTIME "Build with static runtime libs (/MT)" ON)
 # Zlib library needed
 find_package ( ZLIB REQUIRED )
 # pkg_search_module ( ZZIP zzip )
-find_package(Python REQUIRED)
+find_package(PythonInterp REQUIRED)
 find_package(UnixCommands REQUIRED) # bash cp mv rm gzip tar
 find_program(XMLTO xmlto)
 
@@ -23,7 +23,7 @@ set(README ${CMAKE_SOURCE_DIR}/README)
 set(topdir ${CMAKE_SOURCE_DIR})
 set(srcdir ${CMAKE_CURRENT_SOURCE_DIR})
 set(outdir ${CMAKE_CURRENT_BINARY_DIR})
-set(PY ${Python_EXECUTABLE})
+set(PY ${PYTHON_EXECUTABLE})
 
 # targets ########################################################
 set(doc_FILES README.MSVC6 README.SDL COPYING.MPL COPYING.LIB COPYING.ZLIB
index 317e9f8107fb066f10010a78eb28c145f67ea9e2..aaaf39038a5a9695e92c932fb2c77f14168f8d62 100755 (executable)
@@ -1,6 +1,4 @@
-#! /usr/bin/env python
-
-from __future__ import print_function
+#! /usr/bin/env python3
 
 import pygments.lexers.compiled as lexer
 import optparse
index 4acc46043a51935626f8d3e3dea85bd087dfcde4..49cac4e0ff3356fb042f87238ed88cf8428049f3 100755 (executable)
@@ -1,5 +1,4 @@
-#! /usr/bin/python
-from __future__ import print_function
+#! /usr/bin/python3
 
 """ Converts an xml-file with docbook elements into troff manual pages.
     The conversion uses etree expecting <refentry> elements in the input.
index dea1c2ec34169178b1cae820226e6c83f79bc9a7..4453802276db2012582b890e631278d0b53d60f1 100755 (executable)
@@ -1,5 +1,4 @@
-#! /usr/bin/python
-from __future__ import print_function
+#! /usr/bin/python3
 
 """ Searches through a directory and creates an index page for it
 """
index 355fb7fbaaed892213a41bc70350df700c6f989d..0bf82321ebed9e788f93e2104594aa6895fcd45c 100644 (file)
@@ -1,8 +1,6 @@
-#! /usr/bin/python
+#! /usr/bin/python3
 # -*- coding: UTF-8 -*-
 
-from __future__ import print_function
-
 import sys
 import re
 import commands
index 244d069305b950f1b43f4606c262dcdfc65a7745..ad6bf724b360268ab9135ba3dd22a6b2e0762343 100644 (file)
@@ -1,4 +1,5 @@
-from __future__ import print_function
+#! /usr/bin/python3
+
 import sys
 from zzipdoc.match import *
 from zzipdoc.options import *
@@ -38,7 +39,7 @@ class PerFile:
         return None
     def print_list_mainheader(self):
         for t_fileheader in self.headers:
-            print (t_fileheader.get_filename(), t_fileheader.src_mainheader())
+            print(t_fileheader.get_filename(), t_fileheader.src_mainheader())
         
 class PerFunctionEntry:
     def __init__(self, header, comment, prototype):
@@ -67,10 +68,10 @@ class PerFunction:
                                            functionprototype) ]
     def print_list_titleline(self):
         for funcheader in self.headers:
-            print (funcheader.get_filename(), "[=>]", funcheader.get_titleline())
+            print(funcheader.get_filename(), "[=>]", funcheader.get_titleline())
     def print_list_name(self):
         for funcheader in self.prototypes:
-            print (funcheader.get_filename(), "[>>]", funcheader.get_name())
+            print(funcheader.get_filename(), "[>>]", funcheader.get_name())
 
 class PerFunctionFamilyEntry:
     def __init__(self, leader):
@@ -123,12 +124,12 @@ class PerFunctionFamily:
         for name in self.retarget:
             into = self.retarget[name]
             if into not in name_list:
-                print ("function '"+name+"' retarget into '"+into+
-                       "' does not exist - keep alone")
+                print("function '"+name+"' retarget into '"+into+
+                      "' does not exist - keep alone")
             if into in self.retarget:
                 other = self.retarget[into]
-                print ("function '"+name+"' retarget into '"+into+
-                       "' which is itself a retarget into '"+other+"'")
+                print("function '"+name+"' retarget into '"+into+
+                      "' which is itself a retarget into '"+other+"'")
             if into not in lead_list:
                 lead_list += [ into ]
         for func in self.functions:
@@ -142,7 +143,7 @@ class PerFunctionFamily:
                 entry.add(func) # the first
                 self.entries += [ entry ]
             else:
-                print ("head function '"+name+" has no entry")
+                print("head function '"+name+" has no entry")
         for func in self.functions:
             name = func.get_name()
             if name in self.retarget:
@@ -151,14 +152,14 @@ class PerFunctionFamily:
                 if entry is not None:
                     entry.add(func) # will not add duplicates
                 else:
-                    print ("into function '"+name+" has no entry")
+                    print("into function '"+name+" has no entry")
     def print_list_name(self):
         for family in self.entries:
             name = family.get_name()
-            print (name, ":", end = " ")
+            print(name, ":", end = " ")
             for item in family.functions:
-                print (item.get_name(), ",", end = " ")
-            print ("")
+                print(item.get_name(), ",", end = " ")
+            print("")
 class HtmlManualPageAdapter:
     def __init__(self, entry):
         """ usually takes a PerFunctionEntry """
index 7356c3a0db983e75acc56197148933eb62f36fee..f23790a9b4f09e223a3da33fdae8eb7d04018c87 100644 (file)
@@ -1,8 +1,6 @@
-#! /usr/bin/env python
+#! /usr/bin/env python3
 # -*- coding: UTF-8 -*-
 
-from __future__ import print_function
-
 from zzipdoc.match import Match
 
 class DocbookDocument:
index 0a6d743edf1254ce5fec0a130b0dfe9275d82d1b..d0f17cc3d233643d66c8f6416d1808011080ee8b 100644 (file)
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python3
 
 """
 this file converts simple html text into a docbook xml variant. 
@@ -6,8 +6,6 @@ The mapping of markups and links is far from perfect. But all we
 want is the docbook-to-pdf converter and similar technology being
 present in the world of docbook-to-anything converters. """
 
-from __future__ import print_function
-
 from datetime import date
 from zzipdoc.match import Match
 import sys
index 0466b9dfe0e40f9713b2eeb0ec6f4ab4d9d87978..4f771d87cc9187e2417270ab275c4f1334d4b75e 100644 (file)
@@ -1,4 +1,3 @@
-#! /usr/bin/env python
 # -*- coding: UTF-8 -*-
 from __future__ import print_function