From 6d9951f6c17c541ba0d807523a7febc28aa0f6d4f37fa9ea06ab0da49f51bea9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Mon, 9 Dec 2019 07:33:18 +0000 Subject: [PATCH 1/6] Accepting request 755071 from home:benoit_monin:branches:devel:languages:python - update to version 2.5.2 - drop denose.patch: fixed upstream - fix postuninstall alternative OBS-URL: https://build.opensuse.org/request/show/755071 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Pygments?expand=0&rev=59 --- Pygments-2.4.2.tar.gz | 3 - Pygments-2.5.2.tar.gz | 3 + denose.patch | 318 ---------------------------------------- python-Pygments.changes | 74 ++++++++++ python-Pygments.spec | 11 +- 5 files changed, 81 insertions(+), 328 deletions(-) delete mode 100644 Pygments-2.4.2.tar.gz create mode 100644 Pygments-2.5.2.tar.gz delete mode 100644 denose.patch diff --git a/Pygments-2.4.2.tar.gz b/Pygments-2.4.2.tar.gz deleted file mode 100644 index f52fe2e..0000000 --- a/Pygments-2.4.2.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:881c4c157e45f30af185c1ffe8d549d48ac9127433f2c380c24b84572ad66297 -size 9405880 diff --git a/Pygments-2.5.2.tar.gz b/Pygments-2.5.2.tar.gz new file mode 100644 index 0000000..84f0b55 --- /dev/null +++ b/Pygments-2.5.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:98c8aa5a9f778fcd1026a17361ddaf7330d1b7c62ae97c3bb0ae73e0b9b6b0fe +size 20263984 diff --git a/denose.patch b/denose.patch deleted file mode 100644 index cbbcb32..0000000 --- a/denose.patch +++ /dev/null @@ -1,318 +0,0 @@ ---- a/tests/run.py -+++ b/tests/run.py -@@ -17,6 +17,7 @@ from __future__ import print_function - import os - import sys - import warnings -+import unittest - - # only find tests in this directory - if os.path.dirname(__file__): -@@ -30,12 +31,6 @@ warnings.filterwarnings("error", module= - category=DeprecationWarning) - - --try: -- import nose --except ImportError: -- print('nose is required to run the Pygments test suite') -- sys.exit(1) -- - # make sure the current source is first on sys.path - sys.path.insert(0, '..') - -@@ -55,4 +50,4 @@ else: - print('Pygments test suite running (Python %s)...' % sys.version.split()[0], - file=sys.stderr) - --nose.main() -+unittest.main() ---- a/tests/support.py -+++ b/tests/support.py -@@ -5,7 +5,7 @@ Support for Pygments tests - - import os - --from nose import SkipTest -+from unittest import SkipTest - - - def location(mod_name): ---- a/tests/test_cmdline.py -+++ b/tests/test_cmdline.py -@@ -16,11 +16,10 @@ import sys - import tempfile - import unittest - --import support -+from . import support - from pygments import cmdline, highlight - from pygments.util import BytesIO, StringIO - -- - TESTFILE, TESTDIR = support.location(__file__) - TESTCODE = '''\ - def func(args): -@@ -46,7 +45,7 @@ def run_cmdline(*args, **kwds): - new_stdin.write(kwds.get('stdin', '')) - new_stdin.seek(0, 0) - try: -- ret = cmdline.main(['pygmentize'] + list(args)) -+ ret = cmdline.main(['./pygmentize'] + list(args)) - finally: - sys.stdin = saved_stdin - sys.stdout = saved_stdout -@@ -111,8 +110,8 @@ class CmdLineTest(unittest.TestCase): - os.unlink(name) - - def test_load_from_file(self): -- lexer_file = os.path.join(TESTDIR, 'support', 'python_lexer.py') -- formatter_file = os.path.join(TESTDIR, 'support', 'html_formatter.py') -+ lexer_file = os.path.join('tests', 'support', 'python_lexer.py') -+ formatter_file = os.path.join('tests', 'support', 'html_formatter.py') - - # By default, use CustomLexer - o = self.check_success('-l', lexer_file, '-f', 'html', -@@ -143,7 +142,7 @@ class CmdLineTest(unittest.TestCase): - - def test_h_opt(self): - o = self.check_success('-h') -- self.assertTrue('Usage:' in o) -+ self.assertIn('Usage:', o) - - def test_L_opt(self): - o = self.check_success('-L') -@@ -157,37 +156,37 @@ class CmdLineTest(unittest.TestCase): - filename = TESTFILE - o = self.check_success('-Ofull=1,linenos=true,foo=bar', - '-fhtml', filename) -- self.assertTrue('foo, bar=baz=,' in o) -+ self.assertIn('foo, bar=baz=,', o) - - def test_F_opt(self): - filename = TESTFILE - o = self.check_success('-Fhighlight:tokentype=Name.Blubb,' - 'names=TESTFILE filename', - '-fhtml', filename) -- self.assertTrue(' + +- update to version 2.5.2: + * Fix incompatibility with some setuptools versions (PR#1316) + * Fix lexing of ReST field lists (PR#1279) + * Fix lexing of Matlab keywords as field names (PR#1282) + * Recognize double-quoted strings in Matlab (PR#1278) + * Avoid slow backtracking in Vim lexer (PR#1312) + * Fix Scala highlighting of types (PR#1315) + * Highlight field lists more consistently in ReST (PR#1279) + * Fix highlighting Matlab keywords in field names (PR#1282) + * Recognize Matlab double quoted strings (PR#1278) + * Add some Terraform keywords + * Update Modelica lexer to 3.4 + * Update Crystal examples +- additional changes from version 2.5.1: + * This release fixes a packaging issue. No functional changes. +- additional changes from version 2.5.0: + * Added lexers: + + Email (PR#1246) + + Erlang, Elxir shells (PR#823, #1521) + + Notmuch (PR#1264) + + Scdoc (PR#1268) + + Solidity (#1214) + + Zeek (new name for Bro) (PR#1269) + + Zig (PR#820) + * Updated lexers: + + Apache2 Configuration (PR#1251) + + Bash sessions (#1253) + + CSound (PR#1250) + + Dart + + Dockerfile + + Emacs Lisp + + Handlebars (PR#773) + + Java (#1101, #987) + + Logtalk (PR#1261) + + Matlab (PR#1271) + + Praat (PR#1277) + + Python3 (PR#1255) + + Ruby + + YAML (#1528) + + Velocity + * Added styles: + + Inkpot (PR#1276) + * The PythonLexer class is now an alias for the former + Python3Lexer. The old PythonLexer is available as Python2Lexer. + * Bump NasmLexer priority over TasmLexer for .asm files + (fixes #1326) + * Default font in the ImageFormatter has been updated + (#928, PR#1245) + * Test suite switched to py.test, removed nose dependency (#1490) + * Reduce TeraTerm lexer score -- it used to match nearly all + languages (#1256) + * Treat Skylark/Starlark files as Python files (PR#1259) + * Image formatter: actually respect line_number_separator option + * Add LICENSE file to wheel builds + * Agda: fix lambda highlighting + * Dart: support @ annotations + * Dockerfile: accept FROM ... AS syntax + * Emacs Lisp: add more string functions + * GAS: accept registers in directive arguments + * Java: make structural punctuation (braces, parens, colon, + comma) Punctuation, not Operator (#987) + * Java: support var contextual keyword (#1101) + * Matlab: Fix recognition of function keyword (PR#1271) + * Python: recognize .jy filenames (#976) + * Python: recognize f string prefix (#1156) + * Ruby: support squiggly heredocs + * Shell sessions: recognize Virtualenv prompt (PR#1266) + * Velocity: support silent reference syntax +- drop denose.patch: fixed upstream +- fix postuninstall alternative + ------------------------------------------------------------------- Tue Jun 4 14:03:15 UTC 2019 - Tomáš Chvátal diff --git a/python-Pygments.spec b/python-Pygments.spec index 5afbd7d..7aa3da8 100644 --- a/python-Pygments.spec +++ b/python-Pygments.spec @@ -1,7 +1,7 @@ # # spec file for package python-Pygments # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,15 +18,13 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-Pygments -Version: 2.4.2 +Version: 2.5.2 Release: 0 Summary: A syntax highlighting package written in Python License: BSD-2-Clause Group: Development/Languages/Python URL: http://pygments.org Source: https://files.pythonhosted.org/packages/source/P/Pygments/Pygments-%{version}.tar.gz -# bt#birkenfeld/pygments-main#1490 -Patch1: denose.patch # We need pytest just because of its test runner, it seems even # python3 stdlib unittest runner doesn't work BuildRequires: %{python_module pytest} @@ -55,7 +53,6 @@ source code. Highlights are: %prep %setup -q -n Pygments-%{version} -%autopatch -p1 # Remove non-oss licensed files, see bnc# 760344 rm tests/examplefiles/{Sorting,test}.mod @@ -80,14 +77,14 @@ install -Dm0644 doc/pygmentize.1 %{buildroot}%{_mandir}/man1/pygmentize.1 %python_install_alternative pygmentize %postun -%python_install_alternative pygmentize +%python_uninstall_alternative pygmentize %check %pytest %files %{python_files} %license LICENSE -%doc AUTHORS CHANGES TODO +%doc AUTHORS CHANGES %python_alternative %{_bindir}/pygmentize %python3_only %{_mandir}/man1/pygmentize.1* %{python_sitelib}/pygments/ From 5053a4cf20fc4f11df9c8e100efb90064d73255e37636e5973a3f85693381483 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Mon, 9 Mar 2020 22:31:50 +0000 Subject: [PATCH 2/6] Accepting request 783089 from home:benoit_monin:branches:devel:languages:python - update to version 2.6.1 - disable python2 build: Pygments is python 3 only now - remove shebang from pygments/lexers/_usd_builtins.py: unneeded OBS-URL: https://build.opensuse.org/request/show/783089 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Pygments?expand=0&rev=60 --- Pygments-2.5.2.tar.gz | 3 --- Pygments-2.6.1.tar.gz | 3 +++ python-Pygments.changes | 47 +++++++++++++++++++++++++++++++++++++++++ python-Pygments.spec | 8 +++++-- 4 files changed, 56 insertions(+), 5 deletions(-) delete mode 100644 Pygments-2.5.2.tar.gz create mode 100644 Pygments-2.6.1.tar.gz diff --git a/Pygments-2.5.2.tar.gz b/Pygments-2.5.2.tar.gz deleted file mode 100644 index 84f0b55..0000000 --- a/Pygments-2.5.2.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:98c8aa5a9f778fcd1026a17361ddaf7330d1b7c62ae97c3bb0ae73e0b9b6b0fe -size 20263984 diff --git a/Pygments-2.6.1.tar.gz b/Pygments-2.6.1.tar.gz new file mode 100644 index 0000000..1c4d4ec --- /dev/null +++ b/Pygments-2.6.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:647344a061c249a3b74e230c739f434d7ea4d8b1d5f3721bc0f3558049b38f44 +size 3303050 diff --git a/python-Pygments.changes b/python-Pygments.changes index b4ec84a..b96c3ca 100644 --- a/python-Pygments.changes +++ b/python-Pygments.changes @@ -1,3 +1,50 @@ +------------------------------------------------------------------- +Mon Mar 9 19:52:24 UTC 2020 - Benoît Monin + +- update to version 2.6.1: + * This release fixes a packaging issue. No functional changes. +- additional changes from version 2.6.0: + * Running Pygments on Python 2.x is no longer supported. + * Added lexers: + + Linux kernel logs (PR#1310) + + LLVM MIR (PR#1361) + + MiniScript (PR#1397) + + Mosel (PR#1287, PR#1326) + + Parsing Expression Grammar (PR#1336) + + ReasonML (PR#1386) + + Ride (PR#1319, PR#1321) + + Sieve (PR#1257) + + USD (PR#1290) + + WebIDL (PR#1309) + * Updated lexers: + + Apache2 (PR#1378) + + Chapel (PR#1357) + + CSound (PR#1383) + + D (PR#1375, PR#1362) + + Idris (PR#1360) + + Perl6/Raku lexer (PR#1344) + + Python3 (PR#1382, PR#1385) + + Rust: Updated lexer to cover more builtins (mostly macros) + and miscellaneous new syntax (PR#1320) + + SQL: Add temporal support keywords (PR#1402) + * The 256-color/true-color terminal formatters now support the + italic attribute in styles (PR#1288) + * Support HTTP 2/3 header (PR#1308) + * Support missing reason in HTTP header (PR#1322) + * Boogie/Silver: support line continuations and triggers, move + contract keywords to separate category (PR#1299) + * GAS: support C-style comments (PR#1291) + * Fix names in S lexer (PR#1330, PR#1333) + * Fix numeric literals in Ada (PR#1334) + * Recognize .mjs files as Javascript (PR#1392) + * Recognize .eex files as Elixir (PR#1387) + * Fix re.MULTILINE usage (PR#1388) + * Recognize pipenv and poetry dependency & lock files (PR#1376) + * Improve font search on Windows (#1247) + * Remove unused script block (#1401) +- disable python2 build: Pygments is python 3 only now +- remove shebang from pygments/lexers/_usd_builtins.py: unneeded + ------------------------------------------------------------------- Sun Dec 8 17:22:40 UTC 2019 - Benoît Monin diff --git a/python-Pygments.spec b/python-Pygments.spec index 7aa3da8..50abd6c 100644 --- a/python-Pygments.spec +++ b/python-Pygments.spec @@ -1,7 +1,7 @@ # # spec file for package python-Pygments # -# Copyright (c) 2019 SUSE LLC +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,9 +16,10 @@ # +%define skip_python2 1 %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-Pygments -Version: 2.5.2 +Version: 2.6.1 Release: 0 Summary: A syntax highlighting package written in Python License: BSD-2-Clause @@ -57,6 +58,9 @@ source code. Highlights are: # Remove non-oss licensed files, see bnc# 760344 rm tests/examplefiles/{Sorting,test}.mod +# Remove unnecessary shebang +sed -i '1 { /^#!/ d }' pygments/lexers/_usd_builtins.py + %build %python_build From c64fbb99d6e3798da795dc86492cc94b302319406be57e0222c761411ce61ee3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Sat, 14 Mar 2020 07:01:58 +0000 Subject: [PATCH 3/6] Accepting request 784691 from home:benoit_monin:branches:devel:languages:python set the minimal version of python to 3.5 to match upstream requirement OBS-URL: https://build.opensuse.org/request/show/784691 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Pygments?expand=0&rev=61 --- python-Pygments.changes | 6 ++++++ python-Pygments.spec | 1 + 2 files changed, 7 insertions(+) diff --git a/python-Pygments.changes b/python-Pygments.changes index b96c3ca..a9a99b8 100644 --- a/python-Pygments.changes +++ b/python-Pygments.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Mar 13 16:20:21 UTC 2020 - Benoît Monin + +- set the minimal version of python to 3.5 to match upstream + requirement + ------------------------------------------------------------------- Mon Mar 9 19:52:24 UTC 2020 - Benoît Monin diff --git a/python-Pygments.spec b/python-Pygments.spec index 50abd6c..02198d0 100644 --- a/python-Pygments.spec +++ b/python-Pygments.spec @@ -26,6 +26,7 @@ License: BSD-2-Clause Group: Development/Languages/Python URL: http://pygments.org Source: https://files.pythonhosted.org/packages/source/P/Pygments/Pygments-%{version}.tar.gz +BuildRequires: %{python_module base >= 3.5} # We need pytest just because of its test runner, it seems even # python3 stdlib unittest runner doesn't work BuildRequires: %{python_module pytest} From 261354f07d5a10ded82966b4ba317bd35e8d470b68dc6e42d72146fa7d327fd8 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Thu, 19 Mar 2020 05:51:14 +0000 Subject: [PATCH 4/6] Accepting request 786273 from home:benoit_monin:branches:devel:languages:python fix the path of non-oss licensed files to remove OBS-URL: https://build.opensuse.org/request/show/786273 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Pygments?expand=0&rev=62 --- python-Pygments.changes | 5 +++++ python-Pygments.spec | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/python-Pygments.changes b/python-Pygments.changes index a9a99b8..586c7c8 100644 --- a/python-Pygments.changes +++ b/python-Pygments.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Mar 18 21:42:09 UTC 2020 - Benoît Monin + +- fix the path of non-oss licensed files to remove + ------------------------------------------------------------------- Fri Mar 13 16:20:21 UTC 2020 - Benoît Monin diff --git a/python-Pygments.spec b/python-Pygments.spec index 02198d0..a52121b 100644 --- a/python-Pygments.spec +++ b/python-Pygments.spec @@ -57,7 +57,7 @@ source code. Highlights are: %setup -q -n Pygments-%{version} # Remove non-oss licensed files, see bnc# 760344 -rm tests/examplefiles/{Sorting,test}.mod +rm tests/examplefiles/firefox.mak tests/examplefiles/example.webidl # Remove unnecessary shebang sed -i '1 { /^#!/ d }' pygments/lexers/_usd_builtins.py From 87db58e05bdfea9fb3f446d5d7da26002fe2648b6a7e35cc61df61e59fbd0e39 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Tue, 14 Apr 2020 11:38:38 +0000 Subject: [PATCH 5/6] - Don't use %python3_only command, but properly use alternatives. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Pygments?expand=0&rev=63 --- python-Pygments.changes | 5 +++++ python-Pygments.spec | 16 +++++++--------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/python-Pygments.changes b/python-Pygments.changes index 586c7c8..984642b 100644 --- a/python-Pygments.changes +++ b/python-Pygments.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Apr 14 11:38:23 UTC 2020 - Matej Cepl + +- Don't use %python3_only command, but properly use alternatives. + ------------------------------------------------------------------- Wed Mar 18 21:42:09 UTC 2020 - Benoît Monin diff --git a/python-Pygments.spec b/python-Pygments.spec index a52121b..152f566 100644 --- a/python-Pygments.spec +++ b/python-Pygments.spec @@ -67,22 +67,20 @@ sed -i '1 { /^#!/ d }' pygments/lexers/_usd_builtins.py %install %python_install -%{python_expand %$python_install -mv %{buildroot}%{_bindir}/pygmentize %{buildroot}%{_bindir}/pygmentize-%{$python_bin_suffix} -rm -rf %{buildroot}%{$python_sitelib}/tests -%fdupes %{buildroot}%{$python_sitelib} -%if "%{python3_bin_suffix}" != "" install -Dm0644 doc/pygmentize.1 %{buildroot}%{_mandir}/man1/pygmentize.1 -%endif +%python_clone -a %{buildroot}%{_bindir}/pygmentize +%python_clone -a %{buildroot}%{_mandir}/man1/pygmentize.1 +%{python_expand rm -rf %{buildroot}%{$python_sitelib}/tests +%fdupes %{buildroot}%{$python_sitelib} } %prepare_alternative pygmentize %post -%python_install_alternative pygmentize +%{python_install_alternative pygmentize pygmentize.1} %postun -%python_uninstall_alternative pygmentize +%{python_uninstall_alternative pygmentize pygmentize.1} %check %pytest @@ -91,7 +89,7 @@ install -Dm0644 doc/pygmentize.1 %{buildroot}%{_mandir}/man1/pygmentize.1 %license LICENSE %doc AUTHORS CHANGES %python_alternative %{_bindir}/pygmentize -%python3_only %{_mandir}/man1/pygmentize.1* +%python_alternative %{_mandir}/man1/pygmentize.1%{ext_man} %{python_sitelib}/pygments/ %{python_sitelib}/Pygments-%{version}-py%{python_version}.egg-info/ From a2330ab5d6964720c79d8ab3fe0bb1c7cf336be43a769f4fb38a32c989448fc8 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Tue, 14 Apr 2020 17:17:50 +0000 Subject: [PATCH 6/6] Correct removing slave alternatives OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Pygments?expand=0&rev=64 --- python-Pygments.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-Pygments.spec b/python-Pygments.spec index 152f566..61d9084 100644 --- a/python-Pygments.spec +++ b/python-Pygments.spec @@ -80,7 +80,7 @@ install -Dm0644 doc/pygmentize.1 %{buildroot}%{_mandir}/man1/pygmentize.1 %{python_install_alternative pygmentize pygmentize.1} %postun -%{python_uninstall_alternative pygmentize pygmentize.1} +%python_uninstall_alternative pygmentize %check %pytest