From 93312f7d768d74d8b05b101b27c34f439410dc44 Mon Sep 17 00:00:00 2001 From: Thomas Moschny Date: Sun, 3 Jun 2018 16:10:59 +0200 Subject: [PATCH] Try to fix a FTBFS with Python 3.7 (rhbz#1583678). --- markdown-2.6.11-python37.patch | 11 +++++++++++ python-markdown.spec | 16 ++++++++++++---- 2 files changed, 23 insertions(+), 4 deletions(-) create mode 100644 markdown-2.6.11-python37.patch diff --git a/markdown-2.6.11-python37.patch b/markdown-2.6.11-python37.patch new file mode 100644 index 0000000..fc96c27 --- /dev/null +++ b/markdown-2.6.11-python37.patch @@ -0,0 +1,11 @@ +diff -up Markdown-2.6.11/tests/__init__.py.orig markdown/tests/__init__.py +--- Markdown-2.6.11/tests/__init__.py.orig 2018-06-03 10:51:55.518781537 +0000 ++++ Markdown-2.6.11/tests/__init__.py 2018-06-03 10:59:34.088350325 +0000 +@@ -185,5 +185,7 @@ def run(): + # Except for the warnings that shouldn't + warnings.filterwarnings('default', category=PendingDeprecationWarning) + warnings.filterwarnings('default', category=DeprecationWarning, module='markdown') ++ warnings.filterwarnings('default', category=DeprecationWarning, module='yaml') ++ warnings.filterwarnings('default', category=DeprecationWarning, module='nose') + + nose.main(addplugins=[HtmlOutput(), Markdown()]) diff --git a/python-markdown.spec b/python-markdown.spec index f22e2c5..1735068 100644 --- a/python-markdown.spec +++ b/python-markdown.spec @@ -9,11 +9,12 @@ Name: python-%{pkgname} Version: 2.6.11 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Markdown implementation in Python License: BSD URL: https://python-markdown.github.io/ Source0: https://files.pythonhosted.org/packages/source/M/%{srcname}/%{srcname}-%{version}.tar.gz +Patch0: markdown-2.6.11-python37.patch BuildArch: noarch @@ -29,6 +30,7 @@ BuildRequires: python2-devel BuildRequires: python2-nose %if ! 0%{?rhel} BuildRequires: python2-yaml +BuildRequires: python2-tidy %else BuildRequires: python-yaml %endif @@ -47,6 +49,9 @@ BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-nose BuildRequires: python%{python3_pkgversion}-PyYAML %{?python_provide:%python_provide python%{python3_pkgversion}-%{pkgname}} +%if ! 0%{?rhel} +BuildRequires: python%{python3_pkgversion}-tidy +%endif %description -n python%{python3_pkgversion}-%{pkgname} This is a Python implementation of John Gruber's Markdown. It is @@ -56,7 +61,7 @@ there are a few known issues. %prep -%setup -qc -n %{srcname}-%{version} +%autosetup -p0 -c -n %{srcname}-%{version} mv %{srcname}-%{version} python2 %if %{with python3} @@ -111,12 +116,12 @@ ln -s markdown_py-%{python2_version} %{buildroot}%{_bindir}/markdown_py %check pushd python2 -%{__python2} run-tests.py +%{__python2} run-tests.py -v popd %if %{with python3} pushd python3 -%{__python3} run-tests.py +%{__python3} run-tests.py -v popd %endif # with python3 @@ -145,6 +150,9 @@ popd %changelog +* Sun Jun 3 2018 Thomas Moschny - 2.6.11-2 +- Try to fix a FTBFS with Python 3.7 (rhbz#1583678). + * Sun Feb 11 2018 Thomas Moschny - 2.6.11-1 - Update to 2.6.11.