[arch-commits] Commit in python2-sphinx/trunk (PKGBUILD python2-lexer.patch)
Antonio Rojas
arojas at archlinux.org
Fri Jan 24 21:52:04 UTC 2020
Date: Friday, January 24, 2020 @ 21:52:03
Author: arojas
Revision: 555368
Fix python lexer with new pygments
Added:
python2-sphinx/trunk/python2-lexer.patch
Modified:
python2-sphinx/trunk/PKGBUILD
---------------------+
PKGBUILD | 12 +++++++++---
python2-lexer.patch | 22 ++++++++++++++++++++++
2 files changed, 31 insertions(+), 3 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2020-01-24 21:48:16 UTC (rev 555367)
+++ PKGBUILD 2020-01-24 21:52:03 UTC (rev 555368)
@@ -7,7 +7,7 @@
pkgbase=python2-sphinx
pkgname=(python2-sphinx python-sphinx-1)
pkgver=1.8.5
-pkgrel=3
+pkgrel=4
pkgdesc='Python2 documentation generator'
arch=('any')
url='https://www.sphinx-doc.org/'
@@ -27,13 +27,19 @@
makedepends=(python-setuptools)
optdepends=('imagemagick: for ext.imgconverter'
'texlive-latexextra: for generation of PDF documentation')
-source=("https://pypi.org/packages/source/S/Sphinx/Sphinx-$pkgver.tar.gz"{,.asc})
+source=("https://pypi.org/packages/source/S/Sphinx/Sphinx-$pkgver.tar.gz"{,.asc}
+ python2-lexer.patch)
sha512sums=('d7e6a7a6186d1d4e4de0233fb6859da1ef3e02f628512ff9096ef4775b9fb8589edb9052d752925d7a2f1cb7901291af96b5036a5d00f5f58966609bd42872f4'
- 'SKIP')
+ 'SKIP'
+ '2a94562e26a4fd52f327ba7e45a3c97d8ab8cc0d85a6739b5546fb7005ff9f5e574685644837f6b12bed01fe8bedc698286fc55dbd0132a61ba5943d0f6f4d5c')
validpgpkeys=('8A11B79A5D0D749A66F0A030102C2C17498D6B9E' # Takeshi KOMIYA
'E9BEABB07E7B9CC3F56E62C91425F8CE5EBA0E07') # Takayuki Shimizukawa
prepare() {
+ (cd Sphinx-$pkgver
+ patch -p1 -i ../python2-lexer.patch # Use proper python lexer with new pygments
+ )
+
cp -r Sphinx-$pkgver{,-py2}
# change python2 interpreter
find Sphinx-$pkgver-py2 -type f -exec \
Added: python2-lexer.patch
===================================================================
--- python2-lexer.patch (rev 0)
+++ python2-lexer.patch 2020-01-24 21:52:03 UTC (rev 555368)
@@ -0,0 +1,22 @@
+diff --git a/sphinx/highlighting.py b/sphinx/highlighting.py
+index ac2bd1b06..63ca52de2 100644
+--- a/sphinx/highlighting.py
++++ b/sphinx/highlighting.py
+@@ -16,7 +16,7 @@ from pygments.filters import ErrorToken
+ from pygments.formatters import HtmlFormatter, LatexFormatter
+ from pygments.lexer import Lexer # NOQA
+ from pygments.lexers import get_lexer_by_name, guess_lexer
+-from pygments.lexers import PythonLexer, Python3Lexer, PythonConsoleLexer, \
++from pygments.lexers import Python2Lexer, Python3Lexer, PythonConsoleLexer, \
+ CLexer, TextLexer, RstLexer
+ from pygments.styles import get_style_by_name
+ from pygments.util import ClassNotFound
+@@ -40,7 +40,7 @@ logger = logging.getLogger(__name__)
+
+ lexers = dict(
+ none = TextLexer(stripnl=False),
+- python = PythonLexer(stripnl=False),
++ python = Python2Lexer(stripnl=False),
+ python3 = Python3Lexer(stripnl=False),
+ pycon = PythonConsoleLexer(stripnl=False),
+ pycon3 = PythonConsoleLexer(python3=True, stripnl=False),
More information about the arch-commits
mailing list