%bcond_without doc # Sphinx documentation
%bcond_without tests # unit tests
-%define commit 33b5c2a4ec50d18d3f659aa119d3bd11452327da
-%define snap 20180907
-%define rel 2
-
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.7.1
+Release: 3
License: MIT
Group: Libraries/Python
-Source0: https://github.com/rtfd/recommonmark/archive/%{commit}/recommonmark-%{commit}.tar.gz
-# Source0-md5: 64cc2f674a76bf740594055a3be32a2d
-Patch0: %{name}-cm.patch
+#Source0Download: https://pypi.org/simple/recommonmark/
+Source0: https://files.pythonhosted.org/packages/source/r/recommonmark/recommonmark-%{version}.tar.gz
+# Source0-md5: 3c550a76eb62006bf007843a9f1805bb
+# 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
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
BuildRequires: rpm-pythonprov
BuildRequires: rpmbuild(macros) >= 1.714
%if %{with doc}
+BuildRequires: python3-commonmark >= 0.8.1
BuildRequires: sphinx-pdg
%endif
Requires: python-modules >= 1:2.7
Dokumentacja modułu Pythona recommonmark.
%prep
-%setup -q -n recommonmark-%{commit}
+%setup -q -n recommonmark-%{version}
%patch0 -p1
%build
%if %{with python2}
%py_build
-%if %{with tests} && 0
+%if %{with tests}
# skip: python2 uses different XML formatting, tests expect python3 formatting
-%{__python} -m pytest tests
+%{__python} -m pytest tests -k 'not CustomExtensionTests'
%endif
%endif
%py3_build
%if %{with tests}
-%{__python3} -m pytest tests
+# sphinx tests are too dependent on Sphinx version
+%{__python3} -m pytest tests -k 'not test_sphinx'
%endif
%endif
%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}
%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}