update to 2.6.1
This commit is contained in:
parent
94e8018c44
commit
0cb33908ea
Binary file not shown.
BIN
Pygments-2.6.1.tar.gz
Normal file
BIN
Pygments-2.6.1.tar.gz
Normal file
Binary file not shown.
@ -1,12 +0,0 @@
|
|||||||
diff -ur Pygments-2.2.0/pygments/sphinxext.py Pygments-2.2.0.patch/pygments/sphinxext.py
|
|
||||||
--- Pygments-2.2.0/pygments/sphinxext.py 2017-01-22 16:01:32.000000000 -0500
|
|
||||||
+++ Pygments-2.2.0.patch/pygments/sphinxext.py 2018-03-19 12:57:52.099927570 -0400
|
|
||||||
@@ -16,7 +16,7 @@
|
|
||||||
|
|
||||||
from docutils import nodes
|
|
||||||
from docutils.statemachine import ViewList
|
|
||||||
-from sphinx.util.compat import Directive
|
|
||||||
+from docutils.parsers.rst import Directive
|
|
||||||
from sphinx.util.nodes import nested_parse_with_titles
|
|
||||||
|
|
||||||
|
|
||||||
34
pep479.patch
34
pep479.patch
@ -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
|
|
||||||
@ -15,31 +15,25 @@ need to prettify source code. Highlights are: \
|
|||||||
|
|
||||||
Name: python-pygments
|
Name: python-pygments
|
||||||
Summary: Syntax highlighting engine written in Python
|
Summary: Syntax highlighting engine written in Python
|
||||||
Version: 2.2.0
|
Version: 2.6.1
|
||||||
Release: 15
|
Release: 1
|
||||||
License: BSD
|
License: BSD
|
||||||
URL: http://pygments.org/
|
URL: http://pygments.org/
|
||||||
Source0: https://pypi.org/packages/source/P/Pygments/Pygments-%{version}.tar.gz
|
Source0: https://pypi.org/packages/source/P/Pygments/Pygments-%{version}.tar.gz
|
||||||
|
|
||||||
Patch0: import-directive.patch
|
|
||||||
Patch1: pep479.patch
|
|
||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
%{_description}
|
%{_description}
|
||||||
|
|
||||||
%package -n python2-pygments
|
|
||||||
BuildRequires: python2-devel >= 2.4, python2-setuptools
|
|
||||||
BuildRequires: python2-nose, python2-sphinx
|
|
||||||
Summary: Syntax highlighting engine written in Python
|
|
||||||
%{?python_provide:%python_provide python2-pygments}
|
|
||||||
|
|
||||||
%description -n python2-pygments
|
|
||||||
%{_description}
|
|
||||||
|
|
||||||
%package -n python3-pygments
|
%package -n python3-pygments
|
||||||
BuildRequires: python3-devel, python3-setuptools, python3-nose
|
BuildRequires: python3-devel, python3-setuptools
|
||||||
|
%if %{with tests}
|
||||||
|
BuildRequires: python3-pytest
|
||||||
|
%endif
|
||||||
|
%if %{with docs}
|
||||||
|
BuildRequires: python3-sphinx
|
||||||
|
%endif
|
||||||
Summary: Syntax highlighting engine written in Python
|
Summary: Syntax highlighting engine written in Python
|
||||||
%{?python_provide:%python_provide python3-pygments}
|
%{?python_provide:%python_provide python3-pygments}
|
||||||
|
|
||||||
@ -53,27 +47,22 @@ Summary: Syntax highlighting engine written in Python
|
|||||||
|
|
||||||
%build
|
%build
|
||||||
%{__sed} -i 's/\r//' LICENSE
|
%{__sed} -i 's/\r//' LICENSE
|
||||||
%py2_build
|
|
||||||
%py3_build
|
%py3_build
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%py2_install
|
|
||||||
%{__python2} setup.py build_sphinx
|
|
||||||
pushd doc
|
|
||||||
install -d %{buildroot}%{_mandir}/man1
|
|
||||||
mv pygmentize.1 %{buildroot}%{_mandir}/man1/pygmentize.1
|
|
||||||
popd
|
|
||||||
cp -r doc/docs doc/reST
|
|
||||||
|
|
||||||
%py3_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
|
%check
|
||||||
make test PYTHON=%{__python2}
|
make test PYTHON=%{python3}
|
||||||
make test PYTHON=%{__python3}
|
%endif
|
||||||
|
|
||||||
%files -n python2-pygments
|
|
||||||
%license LICENSE
|
|
||||||
%{python2_sitelib}/*
|
|
||||||
|
|
||||||
%files -n python3-pygments
|
%files -n python3-pygments
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
@ -81,9 +70,15 @@ make test PYTHON=%{__python3}
|
|||||||
%{_bindir}/pygmentize
|
%{_bindir}/pygmentize
|
||||||
|
|
||||||
%files help
|
%files help
|
||||||
%doc AUTHORS CHANGES build/sphinx/html doc/reST TODO
|
%doc AUTHORS CHANGES doc/reST
|
||||||
|
%if %{with docs}
|
||||||
%lang(en) %{_mandir}/man1/pygmentize.1*
|
%lang(en) %{_mandir}/man1/pygmentize.1*
|
||||||
|
%doc build/sphinx/html
|
||||||
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Jul 28 2020 jinzhimin<jinzhimin2@huawei.com> - 2.6.1-1
|
||||||
|
- update to 2.6.1-1
|
||||||
|
|
||||||
* Fri Dec 6 2019 caomeng<caomeng5@huawei.com> - 2.2.0-15
|
* Fri Dec 6 2019 caomeng<caomeng5@huawei.com> - 2.2.0-15
|
||||||
- Package init
|
- Package init
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user