X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=lib%2Fconfigure.py;h=b376d5029d47eb9b2c62e8705489e80fa983e495;hb=ecda7b0d557de2075509ebc610c22f009443f952;hp=de9062e0743082387969d6d9e9affece04e2194f;hpb=41524a4f6f1e2165be2b2b2a4e767d19a55fab20;p=lyx.git diff --git a/lib/configure.py b/lib/configure.py index de9062e074..b376d5029d 100644 --- a/lib/configure.py +++ b/lib/configure.py @@ -458,7 +458,7 @@ def checkLuatex(): if DVILUATEX != '': addToRC(r'\converter luatex dvi3 "%s" "latex=lualatex"' % DVILUATEX) # remove temporary files - removeFiles(['luatest.tex', 'luatest.log']) + removeFiles(['luatest.tex', 'luatest.log', 'luatest.aux', 'luatest.pdf']) def checkModule(module): @@ -527,7 +527,7 @@ def checkFormatEntries(dtl_tools): \Format xpm xpm XPM "" "%s" "%s" ""''' % \ (iv, ie, iv, ie, iv, ie, iv, ie, iv, ie, iv, ie, iv, ie, iv, ie, iv, ie, iv, ie) ) # - checkViewerEditor('a text editor', ['sensible-editor', 'xemacs', 'gvim', 'kedit', 'kwrite', 'kate', \ + checkViewerEditor('a text editor', ['xemacs', 'gvim', 'kedit', 'kwrite', 'kate', \ 'nedit', 'gedit', 'notepad'], rc_entry = [r'''\Format asciichess asc "Plain text (chess output)" "" "" "%%" "" \Format asciiimage asc "Plain text (image)" "" "" "%%" "" @@ -561,7 +561,7 @@ def checkFormatEntries(dtl_tools): if xhtmlview == "": addToRC(r'\Format xhtml xhtml "LyXHTML" y "" "" "document,menu=export"') # - checkEditor('a BibTeX editor', ['sensible-editor', 'jabref', 'JabRef', \ + checkEditor('a BibTeX editor', ['jabref', 'JabRef', \ 'pybliographic', 'bibdesk', 'gbib', 'kbib', \ 'kbibtex', 'sixpack', 'bibedit', 'tkbibtex' \ 'xemacs', 'gvim', 'kedit', 'kwrite', 'kate', \ @@ -1169,22 +1169,32 @@ def checkModulesConfig(): ## configuration change. ## "ModuleName" "filename" "Description" "Packages" "Requires" "Excludes" "Category" ''') + # build the list of available modules - foundClasses = [] + seen = [] + # note that this searches the local directory first, then the + # system directory. that way, we pick up the user's version first. for file in glob.glob( os.path.join('layouts', '*.module') ) + \ glob.glob( os.path.join(srcdir, 'layouts', '*.module' ) ) : # valid file? logger.info(file) if not os.path.isfile(file): continue - retval = processModuleFile(file, bool_docbook) + + filename = file.split(os.sep)[-1] + filename = filename[:-7] + if seen.count(filename): + continue + + seen.append(filename) + retval = processModuleFile(file, filename, bool_docbook) if retval != "": tx.write(retval) tx.close() logger.info('\tdone') -def processModuleFile(file, bool_docbook): +def processModuleFile(file, filename, bool_docbook): ''' process module file and get a line of result The top of a module file should look like this: @@ -1209,8 +1219,6 @@ def processModuleFile(file, bool_docbook): modname = desc = pkgs = req = excl = catgy = "" readingDescription = False descLines = [] - filename = file.split(os.sep)[-1] - filename = filename[:-7] for line in open(file).readlines(): if readingDescription: