From de667903ff65d671e788adb068abb7fc37e57bead896cfa350f30d5623d2e93d Mon Sep 17 00:00:00 2001 From: Thomas Bechtold Date: Thu, 27 Jul 2017 16:26:01 +0000 Subject: [PATCH] Accepting request 512810 from home:sebix:branches:devel:languages:python - add fix-commonmark-compatibility.patch to fix imported names OBS-URL: https://build.opensuse.org/request/show/512810 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-recommonmark?expand=0&rev=7 --- fix-commonmark-compatibility.patch | 29 +++++++++++++++++++++++++++++ python-recommonmark.changes | 5 +++++ python-recommonmark.spec | 18 ++++++++---------- 3 files changed, 42 insertions(+), 10 deletions(-) create mode 100644 fix-commonmark-compatibility.patch diff --git a/fix-commonmark-compatibility.patch b/fix-commonmark-compatibility.patch new file mode 100644 index 0000000..b462013 --- /dev/null +++ b/fix-commonmark-compatibility.patch @@ -0,0 +1,29 @@ +--- recommonmark/parser.py 2016-01-05 22:59:38.000000000 +0100 ++++ recommonmark/parser.py 2017-07-20 23:22:53.620321088 +0200 +@@ -3,7 +3,7 @@ + + from docutils import parsers, nodes + +-from CommonMark import DocParser, HTMLRenderer ++from CommonMark import Parser, HtmlRenderer + from warnings import warn + + __all__ = ['CommonMarkParser'] +@@ -80,7 +80,7 @@ + self.current_node = document + self.section_handler = _SectionHandler(document) + +- parser = DocParser() ++ parser = Parser() + + ast = parser.parse(inputstring + '\n') + +@@ -220,7 +220,7 @@ + + + def inline_entity(inline): +- val = HTMLRenderer().renderInline(inline) ++ val = HtmlRenderer().renderInline(inline) + entity_node = nodes.paragraph('', val, format='html') + return entity_node + diff --git a/python-recommonmark.changes b/python-recommonmark.changes index 0813cf7..bb2b295 100644 --- a/python-recommonmark.changes +++ b/python-recommonmark.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Jul 20 21:24:28 UTC 2017 - sebix+novell.com@sebix.at + +- add fix-commonmark-compatibility.patch to fix imported names + ------------------------------------------------------------------- Sat May 6 03:31:54 UTC 2017 - toddrme2178@gmail.com diff --git a/python-recommonmark.spec b/python-recommonmark.spec index f6f4434..55489dd 100644 --- a/python-recommonmark.spec +++ b/python-recommonmark.spec @@ -27,14 +27,16 @@ Group: Development/Languages/Python Url: https://github.com/rtfd/recommonmark Source0: https://files.pythonhosted.org/packages/source/r/recommonmark/recommonmark-%{version}.tar.gz Source1: https://raw.githubusercontent.com/rtfd/recommonmark/master/license.md +# PATCH-FIX-UPSTREAM fix-commonmark-compatibility.patch sebix+novell.com@sebix.at -- fix commonmark renamings +Patch0: fix-commonmark-compatibility.patch +BuildRequires: %{python_module CommonMark} +BuildRequires: %{python_module devel} +BuildRequires: %{python_module docutils} +BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros -BuildRequires: %{python_module devel} -BuildRequires: %{python_module setuptools} -BuildRequires: %{python_module docutils} -BuildRequires: %{python_module CommonMark} -Requires: python-docutils Requires: python-CommonMark +Requires: python-docutils %ifpython2 Obsoletes: %{oldpython}-reCommonMark < %{version} Provides: %{oldpython}-reCommonMark = %{version} @@ -58,9 +60,9 @@ This allows you to write CommonMark inside of Docutils & Sphinx projects. Documentation is available on Read the Docs: http://recommonmark.readthedocs.org - %prep %setup -q -n recommonmark-%{version} +%patch0 # Remove upstream's egg-info rm -rf %{pypi_name}.egg-info #Add missing license and readme @@ -68,11 +70,9 @@ cp -a %{SOURCE1} . # find and remove unneeded shebangs find recommonmark -name "*.py" | xargs sed -i '1 {/^#!/ d}' - %build %python_build - %install %python_install %fdupes %{buildroot}%{_prefix} @@ -84,14 +84,12 @@ find recommonmark -name "*.py" | xargs sed -i '1 {/^#!/ d}' %python_clone -a %{buildroot}%{_bindir}/cm2xetex %python_clone -a %{buildroot}%{_bindir}/cm2xml - %post %{python_install_alternative cm2man cm2latex cm2xetex cm2pseudoxml cm2html cm2xml} %preun %python_uninstall_alternative cm2man - %files %{python_files} %defattr(-,root,root,-) %doc license.md