Accepting request 623133 from home:mimi_vx:branches:devel:languages:python
- add python_37.diff - fixes build with python-3.7+ OBS-URL: https://build.opensuse.org/request/show/623133 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Pygments?expand=0&rev=42
This commit is contained in:
parent
d63efc57f4
commit
5c78e06fdb
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Jul 16 13:21:03 UTC 2018 - mimi.vx@gmail.com
|
||||||
|
|
||||||
|
- add python_37.diff - fixes build with python-3.7+
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Aug 15 12:52:00 UTC 2017 - dmueller@suse.com
|
Tue Aug 15 12:52:00 UTC 2017 - dmueller@suse.com
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-Pygments
|
# spec file for package python-Pygments
|
||||||
#
|
#
|
||||||
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -20,24 +20,23 @@
|
|||||||
Name: python-Pygments
|
Name: python-Pygments
|
||||||
Version: 2.2.0
|
Version: 2.2.0
|
||||||
Release: 0
|
Release: 0
|
||||||
Url: http://pygments.org
|
|
||||||
Summary: Pygments is a syntax highlighting package written in Python
|
Summary: Pygments is a syntax highlighting package written in Python
|
||||||
License: BSD-2-Clause
|
License: BSD-2-Clause
|
||||||
Group: Development/Languages/Python
|
Group: Development/Languages/Python
|
||||||
|
URL: http://pygments.org
|
||||||
Source: https://files.pythonhosted.org/packages/source/P/Pygments/Pygments-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/P/Pygments/Pygments-%{version}.tar.gz
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
Patch0: python_37.diff
|
||||||
BuildRequires: %{python_module devel}
|
BuildRequires: %{python_module devel}
|
||||||
BuildRequires: %{python_module nose}
|
BuildRequires: %{python_module nose}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
|
Requires: python-setuptools
|
||||||
Requires(post): update-alternatives
|
Requires(post): update-alternatives
|
||||||
Requires(postun): update-alternatives
|
Requires(postun): update-alternatives
|
||||||
Requires: python-setuptools
|
|
||||||
Provides: python-pygments = %{version}
|
Provides: python-pygments = %{version}
|
||||||
Obsoletes: python-pygments < %{version}
|
Obsoletes: python-pygments < %{version}
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
%python_subpackages
|
%python_subpackages
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -57,6 +56,7 @@ source code. Highlights are:
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n Pygments-%{version}
|
%setup -q -n Pygments-%{version}
|
||||||
|
%patch0 -p1
|
||||||
# Remove non-oss licensed files, see bnc# 760344
|
# Remove non-oss licensed files, see bnc# 760344
|
||||||
rm tests/examplefiles/{Sorting,test}.mod
|
rm tests/examplefiles/{Sorting,test}.mod
|
||||||
|
|
||||||
@ -68,7 +68,7 @@ rm tests/examplefiles/{Sorting,test}.mod
|
|||||||
%{python_expand %$python_install
|
%{python_expand %$python_install
|
||||||
mv %{buildroot}%{_bindir}/pygmentize %{buildroot}%{_bindir}/pygmentize-%{$python_bin_suffix}
|
mv %{buildroot}%{_bindir}/pygmentize %{buildroot}%{_bindir}/pygmentize-%{$python_bin_suffix}
|
||||||
%fdupes -s %{buildroot}%{$python_sitelib}
|
%fdupes -s %{buildroot}%{$python_sitelib}
|
||||||
%if "%python3_bin_suffix" != ""
|
%if "%{python3_bin_suffix}" != ""
|
||||||
install -Dm0644 doc/pygmentize.1 %{buildroot}%{_mandir}/man1/pygmentize.1
|
install -Dm0644 doc/pygmentize.1 %{buildroot}%{_mandir}/man1/pygmentize.1
|
||||||
%endif
|
%endif
|
||||||
}
|
}
|
||||||
@ -86,8 +86,8 @@ export PYTHONDEBUG=1
|
|||||||
%python_exec tests/run.py
|
%python_exec tests/run.py
|
||||||
|
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
%defattr(-,root,root,-)
|
%license LICENSE
|
||||||
%doc LICENSE AUTHORS CHANGES TODO
|
%doc AUTHORS CHANGES TODO
|
||||||
%python_alternative %{_bindir}/pygmentize
|
%python_alternative %{_bindir}/pygmentize
|
||||||
%python3_only %{_mandir}/man1/pygmentize.1*
|
%python3_only %{_mandir}/man1/pygmentize.1*
|
||||||
%{python_sitelib}/pygments/
|
%{python_sitelib}/pygments/
|
||||||
|
34
python_37.diff
Normal file
34
python_37.diff
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
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
|
Loading…
x
Reference in New Issue
Block a user