forked from pool/python-recommonmark
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
This commit is contained in:
committed by
Git OBS Bridge
parent
07aff2b537
commit
de667903ff
29
fix-commonmark-compatibility.patch
Normal file
29
fix-commonmark-compatibility.patch
Normal file
@@ -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
|
||||
|
@@ -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
|
||||
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user