#3 Update to 2.3.1
Merged 5 years ago by churchyard. Opened 5 years ago by churchyard.
rpms/ churchyard/python-pygments update  into  master

file modified
+1 -1
@@ -5,4 +5,4 @@ 

  /fix-shell-injection-in-font-manager.patch

  /Pygments-2.1.3.tar.gz

  /Pygments-2.2.0.tar.gz

- /import-directive.patch

+ /Pygments-2.3.1.tar.gz

file removed
-34
@@ -1,34 +0,0 @@ 

- diff -r 7941677dc77d pygments/lexers/lisp.py

- --- a/pygments/lexers/lisp.py	Mon Mar 13 19:16:03 2017 +0000

- +++ b/pygments/lexers/lisp.py	Wed Jul 04 18:03:07 2018 +0200

- @@ -2327,13 +2327,13 @@

-              token = Name.Function if token == Literal else token

-              yield index, token, value

-  

- -        raise StopIteration

- +        return

-  

-      def _process_signature(self, tokens):

-          for index, token, value in tokens:

-              if token == Literal and value == '}':

-                  yield index, Punctuation, value

- -                raise StopIteration

- +                return

-              elif token in (Literal, Name.Function):

-                  token = Name.Variable if value.istitle() else Keyword.Type

-              yield index, token, value

- diff -r 7941677dc77d pygments/lexers/sql.py

- --- a/pygments/lexers/sql.py	Mon Mar 13 19:16:03 2017 +0000

- +++ b/pygments/lexers/sql.py	Wed Jul 04 18:03:07 2018 +0200

- @@ -347,7 +347,10 @@

-              # Emit the output lines

-              out_token = Generic.Output

-              while 1:

- -                line = next(lines)

- +                try:

- +                    line = next(lines)

- +                except StopIteration:

- +                    return

-                  mprompt = re_prompt.match(line)

-                  if mprompt is not None:

-                      # push the line back to have it processed by the prompt

file modified
+40 -39
@@ -1,23 +1,22 @@ 

  %global upstream_name Pygments

  %global srcname pygments

  %global sum Syntax highlighting engine written in Python

- %if 0%{?fedora} || 0%{?rhel} > 7

- %global with_python3 1

- %endif

  

+ # when bootstrapping, we cannot yet use sphinx

+ %bcond_without docs

  

  Name:           python-pygments

- Version:        2.2.0

- Release:        17%{?dist}

+ Version:        2.3.1

+ Release:        1%{?dist}

  Summary:        %{sum}

  

  License:        BSD

  URL:            http://pygments.org/

- Source0:        https://pypi.org/packages/source/P/%{upstream_name}/%{upstream_name}-%{version}.tar.gz

- Patch0:         import-directive.patch

- # Support for Python 3.7:

- # https://bitbucket.org/birkenfeld/pygments-main/issues/1457

- Patch1:         pep479.patch

+ Source0:        %{pypi_source %{upstream_name} %{version}}

+ 

+ # https://bitbucket.org/birkenfeld/pygments-main/commits/113118f16792

+ Patch1:         sphinx2.patch

+ 

  BuildArch:      noarch

  

  %description
@@ -37,10 +36,10 @@ 

  

  

  %package -n python2-%{srcname}

- BuildRequires:  python%{?fedora:2}-devel >= 2.4, python%{?fedora:2}-setuptools

- BuildRequires:  python%{?fedora:2}-nose

- BuildRequires:  python%{?fedora:3}-sphinx

- Requires:       python%{?fedora:2}-setuptools

+ BuildRequires:  python2-devel

+ BuildRequires:  python2-setuptools

+ BuildRequires:  python2-nose

+ Requires:       python2-setuptools

  Summary:        %{sum}

  %{?python_provide:%python_provide python2-%{srcname}}

  
@@ -59,10 +58,14 @@ 

    * it is usable as a command-line tool and as a library

    * ... and it highlights even Brainf*ck!

  

- %if 0%{?with_python3}

  %package -n python3-%{srcname}

- BuildRequires:  python3-devel, python3-setuptools, python3-nose

+ BuildRequires:  python3-devel

+ BuildRequires:  python3-setuptools

+ BuildRequires:  python3-nose

  Requires:       python3-setuptools

+ %if %{with docs}

+ BuildRequires:  python3-sphinx

+ %endif

  Summary:        %{sum}

  %{?python_provide:%python_provide python3-%{srcname}}

  
@@ -80,33 +83,28 @@ 

      LaTeX and ANSI sequences

    * it is usable as a command-line tool and as a library

    * ... and it highlights even Brainf*ck!

- %endif

  

  %prep

- %setup -q -n %{upstream_name}-%{version}

- %patch0 -p 1

- %patch1 -p 1

+ %autosetup -p1 -n %{upstream_name}-%{version}

  

  %build

  %{__sed} -i 's/\r//' LICENSE

  %py2_build

- 

- %if 0%{?with_python3}

  %py3_build

- %endif

  

  %install

  # Python 2 install

- # NOTE: sphinx is built on Python2 and packages with python2 and python3

  %py2_install

- %{?fedora:%{__python3}}%{?!fedora:%{__python2}} setup.py build_sphinx

- install doc/pygmentize.1 -Dt %{buildroot}%{_mandir}/man1/

- cp -r doc/docs doc/reST

  

- %if 0%{?with_python3}

  # Python 3 install

  %py3_install

+ 

+ %if %{with docs}

+ %{__python3} setup.py build_sphinx

+ install doc/pygmentize.1 -Dt %{buildroot}%{_mandir}/man1/

  %endif

+ cp -r doc/docs doc/reST

+ 

  

  %check

  make test PYTHON=%{__python2}
@@ -114,26 +112,29 @@ 

  

  

  %files -n python2-pygments

- %doc AUTHORS CHANGES build/sphinx/html doc/reST TODO

- %license LICENSE

- # For noarch packages: sitelib

- %{python2_sitelib}/*

- # Fix build on EL7

- %if !0%{?fedora} && 0%{?rhel} <= 7

- %{_bindir}/pygmentize

- %lang(en) %{_mandir}/man1/pygmentize.1*

+ %doc AUTHORS CHANGES doc/reST TODO

+ %if %{with docs}

+ %doc build/sphinx/html

  %endif

+ %license LICENSE

+ %{python2_sitelib}/pygments/

+ %{python2_sitelib}/Pygments-%{version}-py%{python2_version}.egg-info/

  

- %if 0%{?with_python3}

  %files -n python3-pygments

- %doc AUTHORS CHANGES build/sphinx/html doc/reST TODO

+ %doc AUTHORS CHANGES doc/reST TODO

  %license LICENSE

- %{python3_sitelib}/*

+ %{python3_sitelib}/pygments/

+ %{python3_sitelib}/Pygments-%{version}-py%{python3_version}.egg-info/

  %{_bindir}/pygmentize

+ %if %{with docs}

  %lang(en) %{_mandir}/man1/pygmentize.1*

+ %doc build/sphinx/html

  %endif

  

  %changelog

+ * Tue Mar 12 2019 Miro Hrončok <mhroncok@redhat.com> - 2.3.1-1

+ - Update to 2.3.1

+ 

  * Mon Mar 11 2019 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 2.2.0-17

  - Use python3-sphinx to build docs

  

file modified
+1 -2
@@ -1,2 +1,1 @@ 

- SHA512 (import-directive.patch) = a0ee6528a0a4ceba43c271bee25605f09729765c0cfbda73e70db4df107281bc0f59dc204796ef0cdb1369f156c44b3cfd103d7c6512dc38bd288a84b452e564

- SHA512 (Pygments-2.2.0.tar.gz) = cc0a4f73e19fa6cbf46314de2e809460c807c631e39ba05cbe5edb5f40db1a687aafcd9715585a0ed45f791710eb6038305e273f282f8682df76f30e63710b29

+ SHA512 (Pygments-2.3.1.tar.gz) = 2c36cb42f8dd62e04b7664b5e87f951a8428ccbb6dbe5b5b43d8c7e6923ada0ab55a231bb8e9ed79eb5a85344ed64d3acc8e7bc991ab1f49c58eb612b8002c1e

file added
+14
@@ -0,0 +1,14 @@ 

+ diff --git a/doc/conf.py b/doc/conf.py

+ --- a/doc/conf.py

+ +++ b/doc/conf.py

+ @@ -125,8 +125,8 @@

+  #html_use_smartypants = True

+  

+  # Custom sidebar templates, maps document names to template names.

+ -html_sidebars = {'index': 'indexsidebar.html',

+ -                 'docs/*': 'docssidebar.html'}

+ +html_sidebars = {'index': ['indexsidebar.html'],

+ +                 'docs/*': ['docssidebar.html']}

+  

+  # Additional templates that should be rendered to pages, maps page names to

+  # template names.

I haven't tested this with any of the consumers yet.

I'll also try to reproduce the Sphinx 2.0.0b1 failure and report to Sphinx upstream.

So this is for Pygments upstream to solve:

Running Sphinx v1.8.5
...
/home/.../lib64/python3.7/site-packages/sphinx/builders/html.py:1171: RemovedInSphinx20Warning: Now html_sidebars only allows list of sidebar templates as a value. Support for a string value will be removed at Sphinx-2.0.
  self.add_sidebars(pagename, ctx)

rebased onto 0d88518

5 years ago

rebased onto cd10e9b

5 years ago

Sphinx issue fixed upstream, added a patch.

Pull-Request has been merged by churchyard

5 years ago