diff options
| author | Neil <nyamatongwe@gmail.com> | 2020-04-17 20:24:30 +1000 | 
|---|---|---|
| committer | Neil <nyamatongwe@gmail.com> | 2020-04-17 20:24:30 +1000 | 
| commit | df5f7a0c831a77b4c981e168a5dbbdcaaa4d90b9 (patch) | |
| tree | 36b72451e473470c567d0c108eaa829f1415cf1b | |
| parent | 9e2bd8b981c5d6891b7e0bf9418fd70aceff9602 (diff) | |
| download | scintilla-mirror-df5f7a0c831a77b4c981e168a5dbbdcaaa4d90b9.tar.gz | |
Update Python versions. Modules that are only used as top level scripts or from
scripts that require Python 3.6 have Python 2.x support removed.
Modules that may be called from Python 2 for PySide require Python 2.7.
Documented how to run scripts.
| -rw-r--r-- | doc/ScintillaDoc.html | 2 | ||||
| -rw-r--r-- | lexilla/src/README | 5 | ||||
| -rw-r--r-- | scripts/CheckMentioned.py | 7 | ||||
| -rw-r--r-- | scripts/Face.py | 2 | ||||
| -rw-r--r-- | scripts/FileGenerator.py | 2 | ||||
| -rwxr-xr-x | scripts/HFacer.py | 2 | ||||
| -rw-r--r-- | scripts/ScintillaData.py | 11 | 
7 files changed, 13 insertions, 18 deletions
| diff --git a/doc/ScintillaDoc.html b/doc/ScintillaDoc.html index 1bd27d469..b2d5f10bd 100644 --- a/doc/ScintillaDoc.html +++ b/doc/ScintillaDoc.html @@ -8662,7 +8662,7 @@ EM_SETTARGETDEVICE      <p>To change the set of lexers in Scintilla, add and remove lexer source files      (<code>Lex*.cxx</code>) from the <code>scintilla/lexers directory</code> and run the      <code>scripts/LexGen.py</code> script from the <code>scripts</code> directory to update the make files -    and <code>Catalogue.cxx</code>. <code>LexGen.py</code> requires Python 2.5 or later. If you do +    and <code>Catalogue.cxx</code>. <code>LexGen.py</code> requires Python 3.6 or later. If you do      not have access to Python, you can hand edit <code>Catalogue.cxx</code> in a simple-minded way,      following the patterns of other lexers. The important thing is to include      <code>LINK_LEXER(lmMyLexer);</code> to correspond with the <code>LexerModule diff --git a/lexilla/src/README b/lexilla/src/README index 3ccc4bad1..aec65a08d 100644 --- a/lexilla/src/README +++ b/lexilla/src/README @@ -39,4 +39,7 @@ The built libraries are copied into scintilla/bin.  Lexilla relies on a list of lexers from the scintilla/lexers directory. If any changes are
  made to the set of lexers then source and build files can be regenerated with the
  lexilla/scripts/LexillaGen.py script which requires Python 3 and is tested with 3.7+.
 -	python LexillaGen.py
 +Unix:
 +	python3 LexillaGen.py
 +Windows:
 +	pyw LexillaGen.py
 diff --git a/scripts/CheckMentioned.py b/scripts/CheckMentioned.py index 379225fe1..c80fb2356 100644 --- a/scripts/CheckMentioned.py +++ b/scripts/CheckMentioned.py @@ -2,7 +2,7 @@  # CheckMentioned.py  # Find all the symbols in scintilla/include/Scintilla.h and check if they  # are mentioned in scintilla/doc/ScintillaDoc.html. -# Requires Python 2.7 or later +# Requires Python 3.6 or later  import re, string, sys @@ -22,10 +22,7 @@ uninteresting = {  incFileName = srcRoot + "/scintilla/include/Scintilla.h"  docFileName = srcRoot + "/scintilla/doc/ScintillaDoc.html" -try:	# Old Python -	identCharacters = "_" + string.letters + string.digits -except AttributeError:	# Python 3.x -	identCharacters = "_" + string.ascii_letters + string.digits +identCharacters = "_" + string.ascii_letters + string.digits  # Convert all punctuation characters except '_' into spaces.  def depunctuate(s): diff --git a/scripts/Face.py b/scripts/Face.py index 0fb7253b7..94451bc26 100644 --- a/scripts/Face.py +++ b/scripts/Face.py @@ -2,7 +2,7 @@  # Face.py - module for reading and parsing Scintilla.iface file  # Implemented 2000 by Neil Hodgson neilh@scintilla.org  # Released to the public domain. -# Requires Python 2.5 or later +# Requires Python 2.7 or later  def sanitiseLine(line):  	if line[-1:] == '\n': line = line[:-1] diff --git a/scripts/FileGenerator.py b/scripts/FileGenerator.py index 3e9662632..cf949901c 100644 --- a/scripts/FileGenerator.py +++ b/scripts/FileGenerator.py @@ -4,7 +4,7 @@  # Generate or regenerate source files based on comments in those files.  # May be modified in-place or a template may be generated into a complete file. -# Requires Python 2.5 or later +# Requires Python 2.7 or later  # The files are copied to a string apart from sections between a  # ++Autogenerated comment and a --Autogenerated comment which is  # generated by the CopyWithInsertion function. After the whole string is diff --git a/scripts/HFacer.py b/scripts/HFacer.py index ae4bb2c2f..1e93d688a 100755 --- a/scripts/HFacer.py +++ b/scripts/HFacer.py @@ -2,7 +2,7 @@  # HFacer.py - regenerate the Scintilla.h and SciLexer.h files from the Scintilla.iface interface  # definition file.  # Implemented 2000 by Neil Hodgson neilh@scintilla.org -# Requires Python 2.5 or later +# Requires Python 2.7 or later  import sys  import os diff --git a/scripts/ScintillaData.py b/scripts/ScintillaData.py index 17ac33d27..5bb9fb1bc 100644 --- a/scripts/ScintillaData.py +++ b/scripts/ScintillaData.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3  # ScintillaData.py - implemented 2013 by Neil Hodgson neilh@scintilla.org  # Released to the public domain. @@ -30,7 +31,7 @@  #         dictionary of file names { SCLEX_ID: file name }  # This file can be run to see the data it provides. -# Requires Python 2.7 or later +# Requires Python 3.6 or later  from __future__ import with_statement @@ -178,17 +179,11 @@ def FindCredits(historyFile):                  credits.append(credit)      return credits -def ciCompare(a,b): -    return cmp(a.lower(), b.lower()) -  def ciKey(a):      return a.lower()  def SortListInsensitive(l): -    try:    # Try key function -        l.sort(key=ciKey) -    except TypeError:    # Earlier version of Python, so use comparison function -        l.sort(ciCompare) +    l.sort(key=ciKey)  class ScintillaData:      def __init__(self, scintillaRoot): | 
