[packages/python-recommonmark] - updated to 0.6.0 release - removed obsolete cm patch, upstream is prepared for commonmark 0.8.1 no
qboosh
qboosh at pld-linux.org
Sun Feb 2 09:57:03 CET 2020
commit 69a34bb097b94bed31ffd8f7600c0f925658eca9
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sun Feb 2 09:57:21 2020 +0100
- updated to 0.6.0 release
- removed obsolete cm patch, upstream is prepared for commonmark 0.8.1 now
- added math patch (fix inline math, failed in docutils)
python-recommonmark-cm.patch | 33 ---------------------------------
python-recommonmark-math.patch | 34 ++++++++++++++++++++++++++++++++++
python-recommonmark.spec | 29 +++++++++++++++--------------
3 files changed, 49 insertions(+), 47 deletions(-)
---
diff --git a/python-recommonmark.spec b/python-recommonmark.spec
index c946f1d..66454d0 100644
--- a/python-recommonmark.spec
+++ b/python-recommonmark.spec
@@ -5,27 +5,28 @@
%bcond_without doc # Sphinx documentation
%bcond_without tests # unit tests
-%define commit 33b5c2a4ec50d18d3f659aa119d3bd11452327da
-%define snap 20180907
-%define rel 4
-
Summary: docutils-compatibility bridge to CommonMark
Summary(pl.UTF-8): Pomost zgodności z docutils dla CommonMark
Name: python-recommonmark
-Version: 0.5.0
-Release: 0.%{snap}.%{rel}
+Version: 0.6.0
+Release: 1
License: MIT
Group: Libraries/Python
-Source0: https://github.com/rtfd/recommonmark/archive/%{commit}/recommonmark-%{commit}.tar.gz
-# Source0-md5: 64cc2f674a76bf740594055a3be32a2d
-Patch0: %{name}-cm.patch
+# in case snapshot is required:
+#Source0: https://github.com/rtfd/recommonmark/archive/%{commit}/recommonmark-%{commit}.tar.gz
+#Source0Download: https://pypi.org/simple/recommonmark/
+Source0: https://files.pythonhosted.org/packages/source/r/recommonmark/recommonmark-%{version}.tar.gz
+# Source0-md5: 41edafd4f92392f2b49a1443bab27b90
+# from https://github.com/readthedocs/recommonmark/pull/124
+# https://github.com/readthedocs/recommonmark/commit/917e0359fa93acd9b22d7122e2c03d994d9fda44.patch
+Patch0: %{name}-math.patch
URL: https://recommonmark.readthedocs.io/en/latest/
%if %{with python2}
BuildRequires: python-modules >= 1:2.7
BuildRequires: python-setuptools
%if %{with tests}
BuildRequires: python-Sphinx >= 1.3.1
-BuildRequires: python-commonmark >= 0.8
+BuildRequires: python-commonmark >= 0.8.1
BuildRequires: python-docutils >= 0.11
BuildRequires: python-pytest
%endif
@@ -35,7 +36,7 @@ BuildRequires: python3-modules >= 1:3.3
BuildRequires: python3-setuptools
%if %{with tests}
BuildRequires: python3-Sphinx >= 1.3.1
-BuildRequires: python3-commonmark >= 0.8
+BuildRequires: python3-commonmark >= 0.8.1
BuildRequires: python3-docutils >= 0.11
BuildRequires: python3-pytest
%endif
@@ -83,7 +84,7 @@ Documentation for Python recommonmark module.
Dokumentacja modułu Pythona recommonmark.
%prep
-%setup -q -n recommonmark-%{commit}
+%setup -q -n recommonmark-%{version}
%patch0 -p1
%build
@@ -145,7 +146,7 @@ rm -rf $RPM_BUILD_ROOT
%attr(755,root,root) %{_bindir}/cm2xetex-2
%attr(755,root,root) %{_bindir}/cm2xml-2
%{py_sitescriptdir}/recommonmark
-%{py_sitescriptdir}/recommonmark-%{version}.dev0-py*.egg-info
+%{py_sitescriptdir}/recommonmark-%{version}-py*.egg-info
%endif
%if %{with python3}
@@ -165,7 +166,7 @@ rm -rf $RPM_BUILD_ROOT
%attr(755,root,root) %{_bindir}/cm2xetex-3
%attr(755,root,root) %{_bindir}/cm2xml-3
%{py3_sitescriptdir}/recommonmark
-%{py3_sitescriptdir}/recommonmark-%{version}.dev0-py*.egg-info
+%{py3_sitescriptdir}/recommonmark-%{version}-py*.egg-info
%endif
%if %{with doc}
diff --git a/python-recommonmark-cm.patch b/python-recommonmark-cm.patch
deleted file mode 100644
index 599c7b3..0000000
--- a/python-recommonmark-cm.patch
+++ /dev/null
@@ -1,33 +0,0 @@
---- recommonmark-33b5c2a4ec50d18d3f659aa119d3bd11452327da/setup.py.orig 2018-09-07 17:24:28.000000000 +0200
-+++ recommonmark-33b5c2a4ec50d18d3f659aa119d3bd11452327da/setup.py 2018-10-10 21:41:32.681654515 +0200
-@@ -23,7 +23,7 @@
- 'License :: OSI Approved :: MIT License',
- ],
- install_requires=[
-- 'commonmark>=0.7.3',
-+ 'commonmark>=0.8',
- 'docutils>=0.11',
- 'sphinx>=1.3.1',
- ],
---- recommonmark-33b5c2a4ec50d18d3f659aa119d3bd11452327da/recommonmark/parser.py.orig 2018-09-07 17:24:28.000000000 +0200
-+++ recommonmark-33b5c2a4ec50d18d3f659aa119d3bd11452327da/recommonmark/parser.py 2018-10-10 21:38:29.251656609 +0200
-@@ -6,7 +6,7 @@
- from docutils import parsers, nodes
- from sphinx import addnodes
-
--from CommonMark import Parser
-+from commonmark import Parser
-
- from warnings import warn
-
---- recommonmark-33b5c2a4ec50d18d3f659aa119d3bd11452327da/tests/test_basic.py.orig 2018-09-07 17:24:28.000000000 +0200
-+++ recommonmark-33b5c2a4ec50d18d3f659aa119d3bd11452327da/tests/test_basic.py 2018-10-10 21:38:29.248323276 +0200
-@@ -8,7 +8,7 @@
- from docutils.readers import Reader
- from docutils.core import publish_parts
-
--from CommonMark import Parser
-+from commonmark import Parser
- from recommonmark.parser import CommonMarkParser
-
-
diff --git a/python-recommonmark-math.patch b/python-recommonmark-math.patch
new file mode 100644
index 0000000..9f3f119
--- /dev/null
+++ b/python-recommonmark-math.patch
@@ -0,0 +1,34 @@
+From 917e0359fa93acd9b22d7122e2c03d994d9fda44 Mon Sep 17 00:00:00 2001
+From: Eric Holscher <eric at ericholscher.com>
+Date: Thu, 11 Oct 2018 16:52:24 +0200
+Subject: [PATCH 2/2] Fix passing to math node
+
+---
+ recommonmark/transform.py | 14 ++++++++------
+ 1 file changed, 8 insertions(+), 6 deletions(-)
+
+diff --git a/recommonmark/transform.py b/recommonmark/transform.py
+index 72fd47d..916f144 100644
+--- a/recommonmark/transform.py
++++ b/recommonmark/transform.py
+@@ -205,12 +205,14 @@ def auto_inline_code(self, node):
+ if not self.config['enable_inline_math']:
+ return None
+ content = content[1:-1]
+- self.state_machine.reset(self.document,
+- node.parent,
+- self.current_level)
+- return self.state_machine.run_role('math', content=content)
+- else:
+- return None
++ if content:
++ self.state_machine.reset(self.document,
++ node.parent,
++ self.current_level)
++ # Properly allow rst to get the raw content
++ math_content = '`%s`' % content
++ return self.state_machine.run_role('math', content=math_content)
++ return None
+
+ def auto_code_block(self, node):
+ """Try to automatically generate nodes for codeblock syntax.
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python-recommonmark.git/commitdiff/69a34bb097b94bed31ffd8f7600c0f925658eca9
More information about the pld-cvs-commit
mailing list