From 5f6925dc25513fdb7b2a2011580d0e6b9110e698 Mon Sep 17 00:00:00 2001 From: desert-sailor Date: Tue, 7 Nov 2023 16:59:43 +0800 Subject: [PATCH] Bump mistune from 0.8.4 to mistune_v1 --- 0002-Bump-mistune-from-0.8.4-to-2.0.x.patch | 25 +++++++++++++++++++++ python-m2r.spec | 19 ++++++++++------ 2 files changed, 37 insertions(+), 7 deletions(-) create mode 100644 0002-Bump-mistune-from-0.8.4-to-2.0.x.patch diff --git a/0002-Bump-mistune-from-0.8.4-to-2.0.x.patch b/0002-Bump-mistune-from-0.8.4-to-2.0.x.patch new file mode 100644 index 0000000..f125b41 --- /dev/null +++ b/0002-Bump-mistune-from-0.8.4-to-2.0.x.patch @@ -0,0 +1,25 @@ +From 913bc4de898bc8b8241f1335a706464907c6e549 Mon Sep 17 00:00:00 2001 +From: desert-sailor +Date: Tue, 7 Nov 2023 16:55:30 +0800 +Subject: [PATCH] Bump mistune from 0.8.4 to 2.0.x + +--- + setup.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/setup.py b/setup.py +index adfae0c..d4b7571 100644 +--- a/setup.py ++++ b/setup.py +@@ -16,7 +16,7 @@ except ImportError: + with open(readme_file) as f: + readme = f.read() + +-install_requires = ['mistune<2', 'docutils'] ++install_requires = ['mistune_v1<3', 'docutils'] + test_requirements = ['pygments'] + + setup( +-- +2.41.0 + diff --git a/python-m2r.spec b/python-m2r.spec index cc1ed44..549402c 100644 --- a/python-m2r.spec +++ b/python-m2r.spec @@ -1,20 +1,22 @@ Name: python-m2r Version: 0.3.1 -Release: 1 +Release: 2 Summary: A converter for markdown to reStructuredText License: MIT URL: https://github.com/miyakogi/m2r Source0: https://github.com/miyakogi/m2r/archive/v%{version}/m2r-%{version}.tar.gz #https://github.com/miyakogi/m2r/pull/62 -Patch0: 0001-test_no_file.patch +Patch0: 0001-test_no_file.patch +Patch1: 0002-Bump-mistune-from-0.8.4-to-2.0.x.patch BuildArch: noarch %description The package converts a markdown file including reStructuredText (rst) markups to a valid rST format. %package -n python3-m2r -BuildRequires: python3-devel python3-docutils python3-mistune python3-pygments python3-mock -Requires: python3-docutils python3-mistune +BuildRequires: python3-devel python3-docutils python3-mistune-v1 python3-pygments +BuildRequires: python3-mock python3-pytest +Requires: python3-docutils python3-mistune-v1 Summary: A converter for markdown to reStructuredText %{?python_provide:%python_provide python3-m2r} @@ -25,6 +27,7 @@ The package converts a markdown file including reStructuredText (rst) markups to %autosetup -p1 -n m2r-%{version} rm -rf m2r.egg-info sed -i '1{\@^#!/usr/bin/env python@d}' m2r.py +sed -i 's/mistune/mistune_v1/g' m2r.py %build %py3_build @@ -33,15 +36,17 @@ sed -i '1{\@^#!/usr/bin/env python@d}' m2r.py %py3_install %check -PYTHONPATH=$(pwd) %{__python3} setup.py test -s tests +%pytest %files -n python3-m2r %doc LICENSE README.md %{_bindir}/m2r -%{python3_sitelib}/{__pycache__/*,m2r.py,m2r-%{version}*-py%{python3_version}.egg-info} -%exclude %{python3_sitelib}/tests +%{python3_sitelib}/{__pycache__/*,m2r.py,m2r-*.egg-info} %changelog +* Tue Nov 7 2023 Dongxing Wang - 0.3.1-2 +- Bump mistune from 0.8.4 to 2.0.x + * Tue Feb 28 2023 lvfei - 0.3.1-1 - upgrade to 0.3.1 -- Gitee