Compare commits
10 Commits
e4315609f5
...
255620e459
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
255620e459 | ||
|
|
5f6925dc25 | ||
|
|
e9adbe5b23 | ||
|
|
4369d3d7fb | ||
|
|
c3575c1c30 | ||
|
|
5487c305be | ||
|
|
8190837f69 | ||
|
|
7f5d002234 | ||
|
|
485424b95e | ||
|
|
053d67a1ef |
25
0001-test_no_file.patch
Normal file
25
0001-test_no_file.patch
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
From 84f20338bd2c3a54143256115db91cb9f1d01289 Mon Sep 17 00:00:00 2001
|
||||||
|
From: lvfei <lvfei@kylinos.cn>
|
||||||
|
Date: Tue, 28 Feb 2023 17:26:04 +0800
|
||||||
|
Subject: [PATCH] test_no_file
|
||||||
|
|
||||||
|
---
|
||||||
|
tests/test_cli.py | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/tests/test_cli.py b/tests/test_cli.py
|
||||||
|
index d190a2c..b9e9563 100644
|
||||||
|
--- a/tests/test_cli.py
|
||||||
|
+++ b/tests/test_cli.py
|
||||||
|
@@ -51,7 +51,7 @@ class TestConvert(TestCase):
|
||||||
|
self.assertIn('underscore-emphasis', message)
|
||||||
|
self.assertIn('anonymous-references', message)
|
||||||
|
self.assertIn('inline-math', message)
|
||||||
|
- self.assertIn('options:', message)
|
||||||
|
+ self.assertRegex(message, r'option(s|al arguments):')
|
||||||
|
|
||||||
|
def test_parse_file(self):
|
||||||
|
output = parse_from_file(test_md)
|
||||||
|
--
|
||||||
|
2.27.0
|
||||||
|
|
||||||
25
0002-Bump-mistune-from-0.8.4-to-2.0.x.patch
Normal file
25
0002-Bump-mistune-from-0.8.4-to-2.0.x.patch
Normal 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
|
||||||
|
|
||||||
36
README.en.md
36
README.en.md
@ -1,36 +0,0 @@
|
|||||||
# python-m2r
|
|
||||||
|
|
||||||
#### Description
|
|
||||||
Converts markdown files including rst to a valid rst format.
|
|
||||||
|
|
||||||
#### Software Architecture
|
|
||||||
Software architecture description
|
|
||||||
|
|
||||||
#### Installation
|
|
||||||
|
|
||||||
1. xxxx
|
|
||||||
2. xxxx
|
|
||||||
3. xxxx
|
|
||||||
|
|
||||||
#### Instructions
|
|
||||||
|
|
||||||
1. xxxx
|
|
||||||
2. xxxx
|
|
||||||
3. xxxx
|
|
||||||
|
|
||||||
#### Contribution
|
|
||||||
|
|
||||||
1. Fork the repository
|
|
||||||
2. Create Feat_xxx branch
|
|
||||||
3. Commit your code
|
|
||||||
4. Create Pull Request
|
|
||||||
|
|
||||||
|
|
||||||
#### Gitee Feature
|
|
||||||
|
|
||||||
1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md
|
|
||||||
2. Gitee blog [blog.gitee.com](https://blog.gitee.com)
|
|
||||||
3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore)
|
|
||||||
4. The most valuable open source project [GVP](https://gitee.com/gvp)
|
|
||||||
5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help)
|
|
||||||
6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
|
|
||||||
37
README.md
37
README.md
@ -1,37 +0,0 @@
|
|||||||
# python-m2r
|
|
||||||
|
|
||||||
#### 介绍
|
|
||||||
Converts markdown files including rst to a valid rst format.
|
|
||||||
|
|
||||||
#### 软件架构
|
|
||||||
软件架构说明
|
|
||||||
|
|
||||||
|
|
||||||
#### 安装教程
|
|
||||||
|
|
||||||
1. xxxx
|
|
||||||
2. xxxx
|
|
||||||
3. xxxx
|
|
||||||
|
|
||||||
#### 使用说明
|
|
||||||
|
|
||||||
1. xxxx
|
|
||||||
2. xxxx
|
|
||||||
3. xxxx
|
|
||||||
|
|
||||||
#### 参与贡献
|
|
||||||
|
|
||||||
1. Fork 本仓库
|
|
||||||
2. 新建 Feat_xxx 分支
|
|
||||||
3. 提交代码
|
|
||||||
4. 新建 Pull Request
|
|
||||||
|
|
||||||
|
|
||||||
#### 码云特技
|
|
||||||
|
|
||||||
1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md
|
|
||||||
2. 码云官方博客 [blog.gitee.com](https://blog.gitee.com)
|
|
||||||
3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解码云上的优秀开源项目
|
|
||||||
4. [GVP](https://gitee.com/gvp) 全称是码云最有价值开源项目,是码云综合评定出的优秀开源项目
|
|
||||||
5. 码云官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help)
|
|
||||||
6. 码云封面人物是一档用来展示码云会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
|
|
||||||
BIN
m2r-0.3.1.tar.gz
Normal file
BIN
m2r-0.3.1.tar.gz
Normal file
Binary file not shown.
60
python-m2r.spec
Normal file
60
python-m2r.spec
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
Name: python-m2r
|
||||||
|
Version: 0.3.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-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}
|
||||||
|
|
||||||
|
%description -n python3-m2r
|
||||||
|
The package converts a markdown file including reStructuredText (rst) markups to a valid rST format.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%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
|
||||||
|
|
||||||
|
%install
|
||||||
|
%py3_install
|
||||||
|
|
||||||
|
%check
|
||||||
|
%pytest
|
||||||
|
|
||||||
|
%files -n python3-m2r
|
||||||
|
%doc LICENSE README.md
|
||||||
|
%{_bindir}/m2r
|
||||||
|
%{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
|
||||||
|
|
||||||
|
* Sat May 07 2022 yangping <yangping69@h-partners.com> - 0.1.15-5
|
||||||
|
- Fix error caused by options arguments
|
||||||
|
|
||||||
|
* Mon Oct 12 2020 maminjie <maminjie1@huawei.com> - 0.1.15-4
|
||||||
|
* Drop python2 support
|
||||||
|
|
||||||
|
* Wed Mar 11 2020 Ling Yang <lingyang2@huawei.com> - 0.1.15-3
|
||||||
|
- Package Init
|
||||||
4
python-m2r.yaml
Normal file
4
python-m2r.yaml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
version_control: github
|
||||||
|
src_repo: miyakogi/m2r
|
||||||
|
tag_prefix: "^v"
|
||||||
|
seperator: "."
|
||||||
Loading…
x
Reference in New Issue
Block a user