diff --git a/0001-Fix-do-concurrent-and-go-to-keywords-in-the-Fortran-.patch b/0001-Fix-do-concurrent-and-go-to-keywords-in-the-Fortran-.patch deleted file mode 100644 index 9c40bb8..0000000 --- a/0001-Fix-do-concurrent-and-go-to-keywords-in-the-Fortran-.patch +++ /dev/null @@ -1,543 +0,0 @@ -From a049b539113d20be25df41b65aa0c8981d835511 Mon Sep 17 00:00:00 2001 -From: ecasglez <29178639+ecasglez@users.noreply.github.com> -Date: Sat, 2 Oct 2021 13:16:49 +0200 -Subject: [PATCH] Fix "do concurrent" and "go to" keywords in the Fortran - lexer. (#1877) - -* Fix "do concurrent" and "go to" keywords in the Fortran lexer. - -* "Go to" statement was only highlighted if there was no space between "go" and "to". -* "Concurrent" keyword in the "Do Concurrent" statement was never highlighted because of a typo. It has been fixed. In addition, it now highlights them only if "Concurrent" is right after the "Do" keyword. -* I had to put the "do concurrent" changes before the already available list of keywords. Otherwise it won't highlight "Concurrent" because it finds first the "Do" keyword in the other list and stops searching for more keywords. - -* Fix a bug while parsing Fortran files with go to and do concurrent statements causing wrong highlighting. - -* For example, in the variable name "gotoErr", "goto" was highlighted but it shouldn't. - -* Update Fortran tests to the changes for the "go to statements" - -* Use Text.Whitespace to distinguish Fortran multiword keywords - -Co-authored-by: ecasglez ---- - pygments/lexers/fortran.py | 8 +- - tests/examplefiles/fortran/zmlrpc.f90.output | 168 +++++++++++++----- - .../examplefiles/fortranfixed/ahcon.f.output | 6 +- - 3 files changed, 135 insertions(+), 47 deletions(-) - -diff --git a/pygments/lexers/fortran.py b/pygments/lexers/fortran.py -index 6c6b8f8c..049a57cd 100644 ---- a/pygments/lexers/fortran.py -+++ b/pygments/lexers/fortran.py -@@ -48,11 +48,15 @@ class FortranLexer(RegexLexer): - ], - 'core': [ - # Statements -+ -+ (r'\b(DO)(\s+)(CONCURRENT)\b', bygroups(Keyword, Text.Whitespace, Keyword)), -+ (r'\b(GO)(\s*)(TO)\b', bygroups(Keyword, Text.Whitespace, Keyword)), -+ - (words(( - 'ABSTRACT', 'ACCEPT', 'ALL', 'ALLSTOP', 'ALLOCATABLE', 'ALLOCATE', - 'ARRAY', 'ASSIGN', 'ASSOCIATE', 'ASYNCHRONOUS', 'BACKSPACE', 'BIND', - 'BLOCK', 'BLOCKDATA', 'BYTE', 'CALL', 'CASE', 'CLASS', 'CLOSE', -- 'CODIMENSION', 'COMMON', 'CONCURRRENT', 'CONTIGUOUS', 'CONTAINS', -+ 'CODIMENSION', 'COMMON', 'CONTIGUOUS', 'CONTAINS', - 'CONTINUE', 'CRITICAL', 'CYCLE', 'DATA', 'DEALLOCATE', 'DECODE', - 'DEFERRED', 'DIMENSION', 'DO', 'ELEMENTAL', 'ELSE', 'ENCODE', 'END', - 'ENDASSOCIATE', 'ENDBLOCK', 'ENDDO', 'ENDENUM', 'ENDFORALL', -@@ -60,7 +64,7 @@ class FortranLexer(RegexLexer): - 'ENDSELECT', 'ENDSUBMODULE', 'ENDSUBROUTINE', 'ENDTYPE', 'ENDWHERE', - 'ENTRY', 'ENUM', 'ENUMERATOR', 'EQUIVALENCE', 'ERROR STOP', 'EXIT', - 'EXTENDS', 'EXTERNAL', 'EXTRINSIC', 'FILE', 'FINAL', 'FORALL', 'FORMAT', -- 'FUNCTION', 'GENERIC', 'GOTO', 'IF', 'IMAGES', 'IMPLICIT', -+ 'FUNCTION', 'GENERIC', 'IF', 'IMAGES', 'IMPLICIT', - 'IMPORT', 'IMPURE', 'INCLUDE', 'INQUIRE', 'INTENT', 'INTERFACE', - 'INTRINSIC', 'IS', 'LOCK', 'MEMORY', 'MODULE', 'NAMELIST', 'NULLIFY', - 'NONE', 'NON_INTRINSIC', 'NON_OVERRIDABLE', 'NOPASS', 'ONLY', 'OPEN', -diff --git a/tests/examplefiles/fortran/zmlrpc.f90.output b/tests/examplefiles/fortran/zmlrpc.f90.output -index ff27ddb2..64daf0c0 100644 ---- a/tests/examplefiles/fortran/zmlrpc.f90.output -+++ b/tests/examplefiles/fortran/zmlrpc.f90.output -@@ -908,7 +908,9 @@ - "'Allocate'" Literal.String.Single - ')' Punctuation - '\n ' Text --'goto ' Keyword -+'go' Keyword -+'to' Keyword -+' ' Text - '9999' Literal.Number.Integer - '\n ' Text - 'end ' Keyword -@@ -947,7 +949,9 @@ - "'no_ml_ in mlprc_aply?'" Literal.String.Single - ')' Punctuation - '\n ' Text --'goto ' Keyword -+'go' Keyword -+'to' Keyword -+' ' Text - '9999' Literal.Number.Integer - '\n\n\n ' Text - 'case' Keyword -@@ -1034,7 +1038,9 @@ - '0' Literal.Number.Integer - ')' Punctuation - ' ' Text --'goto ' Keyword -+'go' Keyword -+'to' Keyword -+' ' Text - '9999' Literal.Number.Integer - '\n ' Text - 'allocate' Keyword -@@ -1251,7 +1257,9 @@ - "'Allocate'" Literal.String.Single - ')' Punctuation - '\n ' Text --'goto ' Keyword -+'go' Keyword -+'to' Keyword -+' ' Text - '9999' Literal.Number.Integer - '\n ' Text - 'end ' Keyword -@@ -1442,7 +1450,9 @@ - '0' Literal.Number.Integer - ')' Punctuation - ' ' Text --'goto ' Keyword -+'go' Keyword -+'to' Keyword -+' ' Text - '9999' Literal.Number.Integer - '\n ' Text - 'else\n ' Keyword -@@ -1522,7 +1532,9 @@ - '0' Literal.Number.Integer - ')' Punctuation - ' ' Text --'goto ' Keyword -+'go' Keyword -+'to' Keyword -+' ' Text - '9999' Literal.Number.Integer - '\n\n ' Text - 'else' Keyword -@@ -1889,7 +1901,9 @@ - '0' Literal.Number.Integer - ')' Punctuation - ' ' Text --'goto ' Keyword -+'go' Keyword -+'to' Keyword -+' ' Text - '9999' Literal.Number.Integer - '\n\n ' Text - 'else\n\n ' Keyword -@@ -1991,7 +2005,9 @@ - '0' Literal.Number.Integer - ')' Punctuation - ' ' Text --'goto ' Keyword -+'go' Keyword -+'to' Keyword -+' ' Text - '9999' Literal.Number.Integer - '\n\n\n ' Text - 'case' Keyword -@@ -2409,7 +2425,9 @@ - "'Allocate'" Literal.String.Single - ')' Punctuation - '\n ' Text --'goto ' Keyword -+'go' Keyword -+'to' Keyword -+' ' Text - '9999' Literal.Number.Integer - '\n ' Text - 'end ' Keyword -@@ -2537,7 +2555,9 @@ - '0' Literal.Number.Integer - ')' Punctuation - ' ' Text --'goto ' Keyword -+'go' Keyword -+'to' Keyword -+' ' Text - '9999' Literal.Number.Integer - '\n ' Text - 'else\n ' Keyword -@@ -2618,7 +2638,9 @@ - '0' Literal.Number.Integer - ')' Punctuation - ' ' Text --'goto ' Keyword -+'go' Keyword -+'to' Keyword -+' ' Text - '9999' Literal.Number.Integer - '\n\n ' Text - 'else' Keyword -@@ -2827,7 +2849,9 @@ - '0' Literal.Number.Integer - ')' Punctuation - ' ' Text --'goto ' Keyword -+'go' Keyword -+'to' Keyword -+' ' Text - '9999' Literal.Number.Integer - '\n\n ' Text - 'enddo\n\n\n ' Keyword -@@ -2886,7 +2910,9 @@ - '0' Literal.Number.Integer - ')' Punctuation - ' ' Text --'goto ' Keyword -+'go' Keyword -+'to' Keyword -+' ' Text - '9999' Literal.Number.Integer - '\n\n\n ' Text - 'do ' Keyword -@@ -3028,7 +3054,9 @@ - '0' Literal.Number.Integer - ')' Punctuation - ' ' Text --'goto ' Keyword -+'go' Keyword -+'to' Keyword -+' ' Text - '9999' Literal.Number.Integer - '\n\n ' Text - 'else\n ' Keyword -@@ -3179,7 +3207,9 @@ - '0' Literal.Number.Integer - ')' Punctuation - ' ' Text --'goto ' Keyword -+'go' Keyword -+'to' Keyword -+' ' Text - '9999' Literal.Number.Integer - '\n\n ' Text - 'call ' Keyword -@@ -3237,7 +3267,9 @@ - '0' Literal.Number.Integer - ')' Punctuation - ' ' Text --'goto ' Keyword -+'go' Keyword -+'to' Keyword -+' ' Text - '9999' Literal.Number.Integer - '\n\n ' Text - 'enddo\n\n ' Keyword -@@ -3276,7 +3308,9 @@ - '0' Literal.Number.Integer - ')' Punctuation - ' ' Text --'goto ' Keyword -+'go' Keyword -+'to' Keyword -+' ' Text - '9999' Literal.Number.Integer - '\n\n\n ' Text - 'case' Keyword -@@ -3429,7 +3463,9 @@ - "'Allocate'" Literal.String.Single - ')' Punctuation - '\n ' Text --'goto ' Keyword -+'go' Keyword -+'to' Keyword -+' ' Text - '9999' Literal.Number.Integer - '\n ' Text - 'end ' Keyword -@@ -3523,7 +3559,9 @@ - '0' Literal.Number.Integer - ')' Punctuation - ' ' Text --'goto ' Keyword -+'go' Keyword -+'to' Keyword -+' ' Text - '9999' Literal.Number.Integer - '\n\n ' Text - 'mlprec_wrk' Name -@@ -3598,7 +3636,9 @@ - '0' Literal.Number.Integer - ')' Punctuation - ' ' Text --'goto ' Keyword -+'go' Keyword -+'to' Keyword -+' ' Text - '9999' Literal.Number.Integer - '\n\n ' Text - 'do ' Keyword -@@ -3759,7 +3799,9 @@ - "'Allocate'" Literal.String.Single - ')' Punctuation - '\n ' Text --'goto ' Keyword -+'go' Keyword -+'to' Keyword -+' ' Text - '9999' Literal.Number.Integer - '\n ' Text - 'end ' Keyword -@@ -3887,7 +3929,9 @@ - '0' Literal.Number.Integer - ')' Punctuation - ' ' Text --'goto ' Keyword -+'go' Keyword -+'to' Keyword -+' ' Text - '9999' Literal.Number.Integer - '\n ' Text - 'else\n ' Keyword -@@ -3967,7 +4011,9 @@ - '0' Literal.Number.Integer - ')' Punctuation - ' ' Text --'goto ' Keyword -+'go' Keyword -+'to' Keyword -+' ' Text - '9999' Literal.Number.Integer - '\n\n ' Text - 'else' Keyword -@@ -4197,7 +4243,9 @@ - '0' Literal.Number.Integer - ')' Punctuation - ' ' Text --'goto ' Keyword -+'go' Keyword -+'to' Keyword -+' ' Text - '9999' Literal.Number.Integer - '\n\n ' Text - 'if' Keyword -@@ -4282,7 +4330,9 @@ - '0' Literal.Number.Integer - ')' Punctuation - ' ' Text --'goto ' Keyword -+'go' Keyword -+'to' Keyword -+' ' Text - '9999' Literal.Number.Integer - '\n ' Text - 'endif\n\n ' Keyword -@@ -4426,7 +4476,9 @@ - '0' Literal.Number.Integer - ')' Punctuation - ' ' Text --'goto ' Keyword -+'go' Keyword -+'to' Keyword -+' ' Text - '9999' Literal.Number.Integer - '\n\n ' Text - 'else\n\n ' Keyword -@@ -4549,7 +4601,9 @@ - '0' Literal.Number.Integer - ')' Punctuation - ' ' Text --'goto ' Keyword -+'go' Keyword -+'to' Keyword -+' ' Text - '9999' Literal.Number.Integer - '\n\n\n\n ' Text - 'case' Keyword -@@ -4772,7 +4826,9 @@ - "'Allocate'" Literal.String.Single - ')' Punctuation - '\n ' Text --'goto ' Keyword -+'go' Keyword -+'to' Keyword -+' ' Text - '9999' Literal.Number.Integer - '\n ' Text - 'end ' Keyword -@@ -4898,7 +4954,9 @@ - '0' Literal.Number.Integer - ')' Punctuation - ' ' Text --'goto ' Keyword -+'go' Keyword -+'to' Keyword -+' ' Text - '9999' Literal.Number.Integer - '\n\n ' Text - 'mlprec_wrk' Name -@@ -4973,7 +5031,9 @@ - '0' Literal.Number.Integer - ')' Punctuation - ' ' Text --'goto ' Keyword -+'go' Keyword -+'to' Keyword -+' ' Text - '9999' Literal.Number.Integer - '\n\n ' Text - 'do ' Keyword -@@ -5188,7 +5248,9 @@ - "'Allocate'" Literal.String.Single - ')' Punctuation - '\n ' Text --'goto ' Keyword -+'go' Keyword -+'to' Keyword -+' ' Text - '9999' Literal.Number.Integer - '\n ' Text - 'end ' Keyword -@@ -5274,7 +5336,9 @@ - '0' Literal.Number.Integer - ')' Punctuation - ' ' Text --'goto ' Keyword -+'go' Keyword -+'to' Keyword -+' ' Text - '9999' Literal.Number.Integer - '\n ' Text - 'else\n ' Keyword -@@ -5354,7 +5418,9 @@ - '0' Literal.Number.Integer - ')' Punctuation - ' ' Text --'goto ' Keyword -+'go' Keyword -+'to' Keyword -+' ' Text - '9999' Literal.Number.Integer - '\n\n ' Text - 'else' Keyword -@@ -5574,7 +5640,9 @@ - '0' Literal.Number.Integer - ')' Punctuation - ' ' Text --'goto ' Keyword -+'go' Keyword -+'to' Keyword -+' ' Text - '9999' Literal.Number.Integer - '\n\n ' Text - 'call ' Keyword -@@ -5631,7 +5699,9 @@ - '0' Literal.Number.Integer - ')' Punctuation - ' ' Text --'goto ' Keyword -+'go' Keyword -+'to' Keyword -+' ' Text - '9999' Literal.Number.Integer - '\n\n ' Text - 'if' Keyword -@@ -5716,7 +5786,9 @@ - '0' Literal.Number.Integer - ')' Punctuation - ' ' Text --'goto ' Keyword -+'go' Keyword -+'to' Keyword -+' ' Text - '9999' Literal.Number.Integer - '\n ' Text - 'endif\n\n ' Keyword -@@ -5858,7 +5930,9 @@ - '0' Literal.Number.Integer - ')' Punctuation - ' ' Text --'goto ' Keyword -+'go' Keyword -+'to' Keyword -+' ' Text - '9999' Literal.Number.Integer - '\n\n ' Text - 'else\n ' Keyword -@@ -5995,7 +6069,9 @@ - '0' Literal.Number.Integer - ')' Punctuation - ' ' Text --'goto ' Keyword -+'go' Keyword -+'to' Keyword -+' ' Text - '9999' Literal.Number.Integer - '\n\n ' Text - 'call ' Keyword -@@ -6053,7 +6129,9 @@ - '0' Literal.Number.Integer - ')' Punctuation - ' ' Text --'goto ' Keyword -+'go' Keyword -+'to' Keyword -+' ' Text - '9999' Literal.Number.Integer - '\n\n ' Text - 'enddo\n\n ' Keyword -@@ -6096,7 +6174,9 @@ - '0' Literal.Number.Integer - ')' Punctuation - ' ' Text --'goto ' Keyword -+'go' Keyword -+'to' Keyword -+' ' Text - '9999' Literal.Number.Integer - '\n\n\n ' Text - 'case ' Keyword -@@ -6142,7 +6222,9 @@ - ')' Punctuation - ')' Punctuation - '\n ' Text --'goto ' Keyword -+'go' Keyword -+'to' Keyword -+' ' Text - '9999' Literal.Number.Integer - '\n\n ' Text - 'end ' Keyword -@@ -6190,7 +6272,9 @@ - ')' Punctuation - ')' Punctuation - '\n ' Text --'goto ' Keyword -+'go' Keyword -+'to' Keyword -+' ' Text - '9999' Literal.Number.Integer - '\n\n ' Text - 'end ' Keyword -diff --git a/tests/examplefiles/fortranfixed/ahcon.f.output b/tests/examplefiles/fortranfixed/ahcon.f.output -index bb1e3839..26a015a8 100644 ---- a/tests/examplefiles/fortranfixed/ahcon.f.output -+++ b/tests/examplefiles/fortranfixed/ahcon.f.output -@@ -681,9 +681,9 @@ - '1.D0' Literal.Number.Float - ')' Punctuation - ' ' Text --'GO' Name --' ' Text --'TO' Name -+'GO' Keyword -+' ' Text.Whitespace -+'TO' Keyword - ' ' Text - '100' Literal.Number.Integer - '\n' Text --- -2.33.0 - diff --git a/0001-fixed-typo.patch b/0001-fixed-typo.patch deleted file mode 100644 index bb9d737..0000000 --- a/0001-fixed-typo.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 8eb17ae0541cfaa1140f75358251450bd41c8dfb Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Cl=C3=A9ment=20Saccoccio?= -Date: Thu, 13 May 2021 12:08:41 +0200 -Subject: [PATCH] fixed typo - ---- - pygments/lexers/grammar_notation.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/pygments/lexers/grammar_notation.py b/pygments/lexers/grammar_notation.py -index 79c02e38..910201cd 100644 ---- a/pygments/lexers/grammar_notation.py -+++ b/pygments/lexers/grammar_notation.py -@@ -117,7 +117,7 @@ class AbnfLexer(RegexLexer): - (words(_core_rules, suffix=r'\b'), Keyword), - - # nonterminals (ALPHA *(ALPHA / DIGIT / "-")) -- (r'[a-zA-Z][a-zA-Z0-9-]+\b', Name.Class), -+ (r'[a-zA-Z][a-zA-Z0-9-]*\b', Name.Class), - - # operators - (r'(=/|=|/)', Operator), --- -2.33.0 - diff --git a/Pygments-2.10.0.tar.gz b/Pygments-2.10.0.tar.gz deleted file mode 100644 index c4fd31f..0000000 Binary files a/Pygments-2.10.0.tar.gz and /dev/null differ diff --git a/Pygments-2.15.1.tar.gz b/Pygments-2.15.1.tar.gz new file mode 100644 index 0000000..72ae789 Binary files /dev/null and b/Pygments-2.15.1.tar.gz differ diff --git a/python-pygments.spec b/python-pygments.spec index e9ed7ab..fdf0e7d 100644 --- a/python-pygments.spec +++ b/python-pygments.spec @@ -13,18 +13,14 @@ need to prettify source code. Highlights are: \ * it is usable as a command-line tool and as a library \ * … and it highlights even Perl 6! %bcond_with docs -%bcond_without tests Name: python-pygments Summary: Syntax highlighting engine written in Python -Version: 2.10.0 -Release: 5 +Version: 2.15.1 +Release: 1 License: BSD-2-Clause URL: http://pygments.org/ Source0: https://pypi.org/packages/source/P/Pygments/Pygments-%{version}.tar.gz -Patch0: 0001-fixed-typo.patch -Patch1: 0001-Fix-do-concurrent-and-go-to-keywords-in-the-Fortran-.patch - BuildArch: noarch %description @@ -32,12 +28,14 @@ BuildArch: noarch %package -n python3-pygments BuildRequires: python3-devel, python3-setuptools -%if %{with tests} -BuildRequires: python3-pytest -%endif +BuildRequires: python3-setuptools_scm +BuildRequires: python3-pip +BuildRequires: python3-wheel + %if %{with docs} BuildRequires: python3-sphinx python3-pip %endif + Summary: Syntax highlighting engine written in Python %{?python_provide:%python_provide python3-pygments} @@ -50,23 +48,10 @@ Summary: Syntax highlighting engine written in Python %autosetup -p1 -n Pygments-%{version} %build -%{__sed} -i 's/\r//' LICENSE -%py3_build +%pyproject_build %install -%py3_install -%if %{with docs} -%{__python3} setup.py build_sphinx -rm -rf build/sphinx/html/.buildinfo -install doc/pygmentize.1 -Dt %{buildroot}%{_mandir}/man1/ -chmod -x %{buildroot}%{_mandir}/man1/*.1 -%endif -cp -r doc/docs doc/reST -%if %{with tests} -%check -make test -%endif - +%pyproject_install %files -n python3-pygments %license LICENSE @@ -74,13 +59,15 @@ make test %{_bindir}/pygmentize %files help -%doc AUTHORS CHANGES doc/reST %if %{with docs} %lang(en) %{_mandir}/man1/pygmentize.1* %doc build/sphinx/html %endif %changelog +* Sun Jun 25 2023 li-miaomiao_zhr - 2.15.1-1 +- update package to the latest version of 2.15.1 + * Tue Jan 17 2023 caofei - 2.10.0-5 - Fix "do concurrent" and "go to" keywords in the Fortran