14
0

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:
Thomas Bechtold
2017-07-27 16:26:01 +00:00
committed by Git OBS Bridge
parent 07aff2b537
commit de667903ff
3 changed files with 42 additions and 10 deletions

View File

@@ -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