!12 synchronize master branch to current 20.03 branch
From: @wangxiao65 Reviewed-by: @yanzh_h Signed-off-by: @yanzh_h
This commit is contained in:
commit
29b113f999
106
fix-test-error.patch
Normal file
106
fix-test-error.patch
Normal file
@ -0,0 +1,106 @@
|
|||||||
|
diff --git a/test/test_parsers/test_rst/test_directives/test_code.py b/test-edit/test_parsers/test_rst/test_directives/test_code.py
|
||||||
|
index 8e694c5..1139620 100644
|
||||||
|
--- a/test/test_parsers/test_rst/test_directives/test_code.py
|
||||||
|
+++ b/test-edit/test_parsers/test_rst/test_directives/test_code.py
|
||||||
|
@@ -96,16 +96,16 @@ totest['code'] = [
|
||||||
|
|
||||||
|
totest['code-parsing'] = [
|
||||||
|
["""\
|
||||||
|
-.. code:: python
|
||||||
|
+.. code:: python3
|
||||||
|
:class: testclass
|
||||||
|
|
||||||
|
print('hello world') # to stdout
|
||||||
|
""",
|
||||||
|
"""\
|
||||||
|
<document source="test data">
|
||||||
|
- <literal_block classes="code python testclass" xml:space="preserve">
|
||||||
|
+ <literal_block classes="code python3 testclass" xml:space="preserve">
|
||||||
|
\n\
|
||||||
|
- <inline classes="keyword">
|
||||||
|
+ <inline classes="name builtin">
|
||||||
|
print
|
||||||
|
<inline classes="punctuation">
|
||||||
|
(
|
||||||
|
@@ -118,7 +118,7 @@ totest['code-parsing'] = [
|
||||||
|
# to stdout
|
||||||
|
"""],
|
||||||
|
["""\
|
||||||
|
-.. code:: python
|
||||||
|
+.. code:: python3
|
||||||
|
:class: testclass
|
||||||
|
:name: my_function
|
||||||
|
:number-lines: 7
|
||||||
|
@@ -132,7 +132,7 @@ totest['code-parsing'] = [
|
||||||
|
""",
|
||||||
|
"""\
|
||||||
|
<document source="test data">
|
||||||
|
- <literal_block classes="code python testclass" ids="my-function" names="my_function" xml:space="preserve">
|
||||||
|
+ <literal_block classes="code python3 testclass" ids="my-function" names="my_function" xml:space="preserve">
|
||||||
|
<inline classes="ln">
|
||||||
|
7 \n\
|
||||||
|
<inline classes="keyword">
|
||||||
|
@@ -165,7 +165,7 @@ totest['code-parsing'] = [
|
||||||
|
<inline classes="ln">
|
||||||
|
12 \n\
|
||||||
|
\n\
|
||||||
|
- <inline classes="keyword">
|
||||||
|
+ <inline classes="name builtin">
|
||||||
|
print
|
||||||
|
<inline classes="punctuation">
|
||||||
|
(
|
||||||
|
diff --git a/test/test_parsers/test_rst/test_directives/test_code_long.py b/test-edit/test_parsers/test_rst/test_directives/test_code_long.py
|
||||||
|
index aea0013..ccedd78 100644
|
||||||
|
--- a/test/test_parsers/test_rst/test_directives/test_code_long.py
|
||||||
|
+++ b/test-edit/test_parsers/test_rst/test_directives/test_code_long.py
|
||||||
|
@@ -22,7 +22,7 @@ totest = {}
|
||||||
|
|
||||||
|
totest['code-parsing-long'] = [
|
||||||
|
["""\
|
||||||
|
-.. code:: python
|
||||||
|
+.. code:: python3
|
||||||
|
:number-lines: 7
|
||||||
|
|
||||||
|
def my_function():
|
||||||
|
@@ -34,7 +34,7 @@ totest['code-parsing-long'] = [
|
||||||
|
""",
|
||||||
|
"""\
|
||||||
|
<document source="test data">
|
||||||
|
- <literal_block classes="code python" xml:space="preserve">
|
||||||
|
+ <literal_block classes="code python3" xml:space="preserve">
|
||||||
|
<inline classes="ln">
|
||||||
|
7 \n\
|
||||||
|
<inline classes="keyword">
|
||||||
|
@@ -67,7 +67,7 @@ totest['code-parsing-long'] = [
|
||||||
|
<inline classes="ln">
|
||||||
|
12 \n\
|
||||||
|
\n\
|
||||||
|
- <inline classes="keyword">
|
||||||
|
+ <inline classes="name builtin">
|
||||||
|
print
|
||||||
|
<inline classes="punctuation">
|
||||||
|
(
|
||||||
|
diff --git a/test/test_parsers/test_rst/test_interpreted.py b/test-edit/test_parsers/test_rst/test_interpreted.py
|
||||||
|
index 6380b48..e7be2eb 100755
|
||||||
|
--- a/test/test_parsers/test_rst/test_interpreted.py
|
||||||
|
+++ b/test-edit/test_parsers/test_rst/test_interpreted.py
|
||||||
|
@@ -269,7 +269,7 @@ Custom role based on code role:
|
||||||
|
Custom role based on code role:
|
||||||
|
|
||||||
|
.. role:: python(code)
|
||||||
|
- :language: python
|
||||||
|
+ :language: python3
|
||||||
|
:class: testclass
|
||||||
|
|
||||||
|
Python code :python:`print("The end")`.
|
||||||
|
@@ -280,8 +280,8 @@ Python code :python:`print("The end")`.
|
||||||
|
Custom role based on code role:
|
||||||
|
<paragraph>
|
||||||
|
Python code \n\
|
||||||
|
- <literal classes="code testclass python">
|
||||||
|
- <inline classes="keyword">
|
||||||
|
+ <literal classes="code testclass python3">
|
||||||
|
+ <inline classes="name builtin">
|
||||||
|
print
|
||||||
|
<inline classes="punctuation">
|
||||||
|
(
|
||||||
@ -4,15 +4,16 @@
|
|||||||
|
|
||||||
Name: python-%{modname}
|
Name: python-%{modname}
|
||||||
Version: 0.16
|
Version: 0.16
|
||||||
Release: 1
|
Release: 4
|
||||||
Summary: Documentation Utilities Written in Python, for General- and Special-Purpose Use
|
Summary: Documentation Utilities Written in Python, for General- and Special-Purpose Use
|
||||||
License: Public Domain and BSD and Python and GPLv3+
|
License: Public Domain and BSD and Python and GPLv3+
|
||||||
URL: http://docutils.sourceforge.net
|
URL: http://docutils.sourceforge.net
|
||||||
Source0: http://downloads.sourceforge.net/docutils/%{version}/docutils-0.16.tar.gz
|
Source0: http://downloads.sourceforge.net/docutils/docutils-0.16.tar.gz
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
BuildRequires: python2-devel python2-setuptools
|
BuildRequires: python2-devel python2-setuptools
|
||||||
BuildRequires: python3-devel python2-tools
|
BuildRequires: python3-devel python2-tools
|
||||||
|
Patch0000: fix-test-error.patch
|
||||||
|
|
||||||
%global _description \
|
%global _description \
|
||||||
Docutils is an open-source text processing system for processing plaintext\
|
Docutils is an open-source text processing system for processing plaintext\
|
||||||
@ -35,6 +36,7 @@ Obsoletes: docutils < %{version}-%{release}
|
|||||||
|
|
||||||
%package -n python3-%{modname}
|
%package -n python3-%{modname}
|
||||||
Summary: %{summary} for python3
|
Summary: %{summary} for python3
|
||||||
|
Requires: python3-lxml
|
||||||
%{?python_provide:%python_provide python3-%{modname}}
|
%{?python_provide:%python_provide python3-%{modname}}
|
||||||
|
|
||||||
%description -n python3-%{modname}
|
%description -n python3-%{modname}
|
||||||
@ -47,7 +49,7 @@ This package run under python3.
|
|||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -n %{modname}-%{version}
|
%autosetup -n %{modname}-%{version} -p1
|
||||||
|
|
||||||
# Remove shebang from library files
|
# Remove shebang from library files
|
||||||
for file in {code_analyzer,punctuation_chars,error_reporting,smartquotes,math/latex2mathml,math/math2html}; do
|
for file in {code_analyzer,punctuation_chars,error_reporting,smartquotes,math/latex2mathml,math/math2html}; do
|
||||||
@ -61,6 +63,9 @@ mv tmp tools/editors/emacs/IDEAS.rst
|
|||||||
rm -rf %{py3dir}
|
rm -rf %{py3dir}
|
||||||
cp -a . %{py3dir}
|
cp -a . %{py3dir}
|
||||||
|
|
||||||
|
pushd %{py3dir}
|
||||||
|
rm -rf test/test_writers/test_odt.py
|
||||||
|
popd
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%py2_build
|
%py2_build
|
||||||
@ -112,8 +117,20 @@ popd
|
|||||||
%doc THANKS.txt docs tools/editors
|
%doc THANKS.txt docs tools/editors
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Fri Aug 28 2020 SimpleUpdate Robot <tc@openeuler.org> - 0.16-1
|
* Thu Sep 10 2020 wangxiao <wangxiao65@huawei.com> - 0.16-4
|
||||||
- Upgrade to version 0.16
|
- fix rst2odt_prepstyles error
|
||||||
|
|
||||||
|
* Mon Aug 3 2020 wutao <wutao61@huawei.com> - 0.16-3
|
||||||
|
- fix test error problem
|
||||||
|
|
||||||
|
* Wed Jul 29 2020 dingyue <dingyue5@huawei.com> - 0.16-2
|
||||||
|
- Fix 0.16-1 for error
|
||||||
|
|
||||||
|
* Thu Jul 23 2020 dingyue <dingyue5@huawei.com> - 0.16-1
|
||||||
|
- NA
|
||||||
|
|
||||||
|
* Wed Jun 24 2020 wangyue <wangyue92@huawei.com> - 0.14-8
|
||||||
|
- Fix python3.8 complied failed
|
||||||
|
|
||||||
* Fri Jan 10 2020 qinjian <qinjian18@huawei.com> - 0.14-7
|
* Fri Jan 10 2020 qinjian <qinjian18@huawei.com> - 0.14-7
|
||||||
- Update Source0
|
- Update Source0
|
||||||
|
|||||||
4
python-docutils.yaml
Normal file
4
python-docutils.yaml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
version_control: svn
|
||||||
|
src_repo: http://svn.code.sf.net/p/docutils/code
|
||||||
|
tag_prefix: docutils-
|
||||||
|
seperator: .
|
||||||
Loading…
x
Reference in New Issue
Block a user