!7 Bump mistune from 0.8.4 to 2.0.x

From: @desert-sailor 
Reviewed-by: @yangzhao_kl 
Signed-off-by: @yangzhao_kl
This commit is contained in:
openeuler-ci-bot 2023-11-10 11:07:15 +00:00 committed by Gitee
commit 255620e459
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 37 additions and 7 deletions

View File

@ -0,0 +1,25 @@
From 913bc4de898bc8b8241f1335a706464907c6e549 Mon Sep 17 00:00:00 2001
From: desert-sailor <dxwangk@isoftstone.com>
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

View File

@ -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
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 <dxwangk@isoftstone.com> - 0.3.1-2
- Bump mistune from 0.8.4 to 2.0.x
* Tue Feb 28 2023 lvfei <lvfei@kylinos.cn> - 0.3.1-1
- upgrade to 0.3.1