[LyX features/feature/docbook] DocBook: in configure.py, DeclareDocBookClass doesn't need to be checked anymore.

Thibaut Cuvelier tcuvelier at lyx.org
Thu Sep 10 23:28:37 UTC 2020


The branch, feature/docbook, has been updated.

- Log -----------------------------------------------------------------

commit dcaaa5970efc34562a7f90a2fd438b30f38b1bfd
Author: Thibaut Cuvelier <tcuvelier at lyx.org>
Date:   Fri Sep 11 01:51:33 2020 +0200

    DocBook: in configure.py, DeclareDocBookClass doesn't need to be checked anymore.

diff --git a/lib/configure.py b/lib/configure.py
index 2247c78..55d9a43 100644
--- a/lib/configure.py
+++ b/lib/configure.py
@@ -1339,7 +1339,7 @@ def processLayoutFile(file):
     '''
     classname = file.split(os.sep)[-1].split('.')[0]
     # return ('LaTeX', '[a,b]', 'a', ',b,c', 'article') for \DeclareLaTeXClass[a,b,c]{article}
-    p = re.compile('\s*#\s*\\\\Declare(LaTeX|DocBook)Class\s*(\[([^,]*)(,.*)*\])*\s*{(.*)}\s*$')
+    p = re.compile('\s*#\s*\\\\DeclareLaTeXClass\s*(\[([^,]*)(,.*)*\])*\s*{(.*)}\s*$')
     q = re.compile('\s*#\s*\\\\DeclareCategory{(.*)}\s*$')
     classdeclaration = ""
     categorydeclaration = '""'
@@ -1434,7 +1434,7 @@ def checkLatexConfig(check_config):
     # Construct the list of classes to test for.
     # build the list of available layout files and convert it to commands
     # for chkconfig.ltx
-    declare = re.compile('\\s*#\\s*\\\\Declare(LaTeX|DocBook)Class\\s*(\[([^,]*)(,.*)*\])*\\s*{(.*)}\\s*$')
+    declare = re.compile('\\s*#\\s*\\\\DeclareLaTeXClass\\s*(\[([^,]*)(,.*)*\])*\\s*{(.*)}\\s*$')
     category = re.compile('\\s*#\\s*\\\\DeclareCategory{(.*)}\\s*$')
     empty = re.compile('\\s*$')
     testclasses = list()

commit e32b7760ed8ff7617116c87b806b09a0632e3500
Author: Thibaut Cuvelier <tcuvelier at lyx.org>
Date:   Fri Sep 11 01:50:26 2020 +0200

    DocBook: remove now useless function in configure.py.

diff --git a/lib/configure.py b/lib/configure.py
index 1547000..2247c78 100644
--- a/lib/configure.py
+++ b/lib/configure.py
@@ -1265,26 +1265,6 @@ def checkConverterEntries():
 ''')
 
 
-def checkDocBook():
-    ''' Check docbook '''
-    path, DOCBOOK = checkProg('SGML-tools 2.x (DocBook), db2x scripts or xsltproc', ['sgmltools', 'db2dvi', 'xsltproc'],
-        rc_entry = [
-            r'''\converter docbook    dvi        "sgmltools -b dvi $$i"	""
-\converter docbook    html       "sgmltools -b html $$i"	""
-\converter docbook    ps         "sgmltools -b ps $$i"	""''',
-            r'''\converter docbook    dvi        "db2dvi $$i"	""
-\converter docbook    html       "db2html $$i"	""''',
-            r'''\converter docbook    dvi        ""	""
-\converter docbook    html       "" ""''',
-            r'''\converter docbook    dvi        ""	""
-\converter docbook    html       ""	""'''])
-    #
-    if DOCBOOK:
-        return ('yes', 'true', '\\def\\hasdocbook{yes}')
-    else:
-        return ('no', 'false', '')
-
-
 def checkOtherEntries():
     ''' entries other than Format and Converter '''
     checkProg('ChkTeX', ['chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38'],

-----------------------------------------------------------------------

Summary of changes:
 lib/configure.py |   24 ++----------------------
 1 files changed, 2 insertions(+), 22 deletions(-)


hooks/post-receive
-- 
Repository for new features


More information about the lyx-cvs mailing list