mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
* configure.py:
- when a layout file has no valid \Declare line, issue a warning and skip this file instead of aborting the whole configuration process. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37807 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
306cb190c8
commit
594179f330
@ -1068,17 +1068,21 @@ def checkLatexConfig(check_config, bool_docbook):
|
|||||||
testclasses = list()
|
testclasses = list()
|
||||||
for file in glob.glob( os.path.join('layouts', '*.layout') ) + \
|
for file in glob.glob( os.path.join('layouts', '*.layout') ) + \
|
||||||
glob.glob( os.path.join(srcdir, 'layouts', '*.layout' ) ) :
|
glob.glob( os.path.join(srcdir, 'layouts', '*.layout' ) ) :
|
||||||
|
nodeclaration = False
|
||||||
if not os.path.isfile(file):
|
if not os.path.isfile(file):
|
||||||
continue
|
continue
|
||||||
classname = file.split(os.sep)[-1].split('.')[0]
|
classname = file.split(os.sep)[-1].split('.')[0]
|
||||||
for line in open(file).readlines():
|
for line in open(file).readlines():
|
||||||
if not empty.match(line) and line[0] != '#':
|
if not empty.match(line) and line[0] != '#':
|
||||||
logger.error("Failed to find \Declare line for layout file `" + file + "'")
|
logger.warning("Failed to find valid \Declare line for layout file `" + file + "'.\n\t=> Skipping this file!")
|
||||||
sys.exit(3)
|
nodeclaration = True
|
||||||
|
break
|
||||||
if declare.search(line) == None:
|
if declare.search(line) == None:
|
||||||
continue
|
continue
|
||||||
testclasses.append("\\TestDocClass{%s}{%s}" % (classname, line[1:].strip()))
|
testclasses.append("\\TestDocClass{%s}{%s}" % (classname, line[1:].strip()))
|
||||||
break
|
break
|
||||||
|
if nodeclaration:
|
||||||
|
continue
|
||||||
testclasses.sort()
|
testclasses.sort()
|
||||||
cl = open('chklayouts.tex', 'w')
|
cl = open('chklayouts.tex', 'w')
|
||||||
for line in testclasses:
|
for line in testclasses:
|
||||||
|
Loading…
Reference in New Issue
Block a user