Run the tests, fix Python 3.7
This commit is contained in:
parent
559be8fd96
commit
dc90bb3cfd
34
pep479.patch
Normal file
34
pep479.patch
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
|
@ -8,13 +8,16 @@
|
|||||||
|
|
||||||
Name: python-pygments
|
Name: python-pygments
|
||||||
Version: 2.2.0
|
Version: 2.2.0
|
||||||
Release: 12%{?dist}
|
Release: 13%{?dist}
|
||||||
Summary: %{sum}
|
Summary: %{sum}
|
||||||
|
|
||||||
License: BSD
|
License: BSD
|
||||||
URL: http://pygments.org/
|
URL: http://pygments.org/
|
||||||
Source0: https://pypi.org/packages/source/P/%{upstream_name}/%{upstream_name}-%{version}.tar.gz
|
Source0: https://pypi.org/packages/source/P/%{upstream_name}/%{upstream_name}-%{version}.tar.gz
|
||||||
Patch0: import-directive.patch
|
Patch0: import-directive.patch
|
||||||
|
# Support for Python 3.7:
|
||||||
|
# https://bitbucket.org/birkenfeld/pygments-main/issues/1457
|
||||||
|
Patch1: pep479.patch
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -79,6 +82,7 @@ need to prettify source code. Highlights are:
|
|||||||
%prep
|
%prep
|
||||||
%setup -q -n %{upstream_name}-%{version}
|
%setup -q -n %{upstream_name}-%{version}
|
||||||
%patch0 -p 1
|
%patch0 -p 1
|
||||||
|
%patch1 -p 1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%{__sed} -i 's/\r//' LICENSE
|
%{__sed} -i 's/\r//' LICENSE
|
||||||
@ -105,7 +109,8 @@ cp -r doc/docs doc/reST
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%check
|
%check
|
||||||
make test || :
|
make test PYTHON=%{__python2}
|
||||||
|
make test PYTHON=%{__python3}
|
||||||
|
|
||||||
|
|
||||||
%files -n python2-pygments
|
%files -n python2-pygments
|
||||||
@ -129,6 +134,10 @@ make test || :
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Jul 04 2018 Miro Hrončok <mhroncok@redhat.com> - 2.2.0-13
|
||||||
|
- Run tests
|
||||||
|
- Add fix for 3.7
|
||||||
|
|
||||||
* Thu Jun 14 2018 Miro Hrončok <mhroncok@redhat.com> - 2.2.0-12
|
* Thu Jun 14 2018 Miro Hrončok <mhroncok@redhat.com> - 2.2.0-12
|
||||||
- Rebuilt for Python 3.7
|
- Rebuilt for Python 3.7
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user