1
0

- Add patch to fix test fixtures with new pygments:

* pygments25.patch

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-readme_renderer?expand=0&rev=7
This commit is contained in:
Tomáš Chvátal 2020-03-14 09:45:36 +00:00 committed by Git OBS Bridge
parent 5f1634ac58
commit 23b3e0c2c5
3 changed files with 36 additions and 7 deletions

25
pygments25.patch Normal file
View File

@ -0,0 +1,25 @@
Index: readme_renderer-24.0/tests/fixtures/test_CommonMark_008.html
===================================================================
--- readme_renderer-24.0.orig/tests/fixtures/test_CommonMark_008.html
+++ readme_renderer-24.0/tests/fixtures/test_CommonMark_008.html
@@ -1,6 +1,6 @@
<p>Here is some Python code for a <code>Dog</code>:</p>
<pre><span class="k">class</span> <span class="nc">Dog</span><span class="p">(</span><span class="n">Animal</span><span class="p">):</span>
- <span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">name</span><span class="p">):</span>
+ <span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">name</span><span class="p">):</span>
<span class="bp">self</span><span class="o">.</span><span class="n">name</span> <span class="o">=</span> <span class="n">name</span>
<span class="k">def</span> <span class="nf">make_sound</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
Index: readme_renderer-24.0/tests/fixtures/test_rst_008.html
===================================================================
--- readme_renderer-24.0.orig/tests/fixtures/test_rst_008.html
+++ readme_renderer-24.0/tests/fixtures/test_rst_008.html
@@ -4,7 +4,7 @@
<span class="bp">self</span><span class="o">.</span><span class="n">name</span> <span class="o">=</span> <span class="n">name</span>
<span class="k">def</span> <span class="nf">make_sound</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
- <span class="k">print</span><span class="p">(</span><span class="s1">'Ruff!'</span><span class="p">)</span>
+ <span class="nb">print</span><span class="p">(</span><span class="s1">'Ruff!'</span><span class="p">)</span>
<span class="n">dog</span> <span class="o">=</span> <span class="n">Dog</span><span class="p">(</span><span class="s1">'Fido'</span><span class="p">)</span>
</pre>

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Sat Mar 14 09:44:32 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
- Add patch to fix test fixtures with new pygments:
* pygments25.patch
-------------------------------------------------------------------
Sun Mar 3 09:43:05 UTC 2019 - John Vandenberg <jayvdb@gmail.com>

View File

@ -1,7 +1,7 @@
#
# spec file for package python-readme_renderer
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2020 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -22,9 +22,9 @@ Version: 24.0
Release: 0
Summary: A library for rendering "readme" descriptions
License: Apache-2.0
Group: Development/Languages/Python
Url: https://github.com/pypa/readme_renderer
URL: https://github.com/pypa/readme_renderer
Source: https://files.pythonhosted.org/packages/source/r/readme_renderer/readme_renderer-%{version}.tar.gz
Patch0: pygments25.patch
BuildRequires: %{python_module Pygments}
BuildRequires: %{python_module bleach >= 3.0.0}
BuildRequires: %{python_module check-manifest}
@ -43,7 +43,6 @@ Requires: python-docutils >= 0.13.1
Requires: python-six
Recommends: python-cmarkgfm >= 0.2.0
BuildArch: noarch
%python_subpackages
%description
@ -53,6 +52,7 @@ long_description for packages.
%prep
%setup -q -n readme_renderer-%{version}
%patch0 -p1
%build
%python_build
@ -63,9 +63,7 @@ long_description for packages.
%check
export LANG=en_US.UTF-8
%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitelib}
py.test-%{$python_bin_suffix}
}
%pytest
%files %{python_files}
%license LICENSE