1 |
commit: 1a212cc27ee58df3824416c1afca100b9bd96e0a |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Mar 2 12:27:14 2020 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Mar 2 12:30:57 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1a212cc2 |
7 |
|
8 |
dev-python/docutils: Bump to 0.16 |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
dev-python/docutils/Manifest | 1 + |
13 |
dev-python/docutils/docutils-0.16.ebuild | 72 ++++++++++++++++++++++ |
14 |
.../docutils/files/docutils-0.16-tests.patch | 66 ++++++++++++++++++++ |
15 |
3 files changed, 139 insertions(+) |
16 |
|
17 |
diff --git a/dev-python/docutils/Manifest b/dev-python/docutils/Manifest |
18 |
index bf166a18389..e8f81ee81ed 100644 |
19 |
--- a/dev-python/docutils/Manifest |
20 |
+++ b/dev-python/docutils/Manifest |
21 |
@@ -2,3 +2,4 @@ DIST docutils-0.12.tar.gz 1618353 BLAKE2B c431e4f2d5ca21235bba860ae7aa4698af0f41 |
22 |
DIST docutils-0.13.1.tar.gz 1735216 BLAKE2B 6229e7de842c6871bcc44a536333f005c5f4691423a4284d72f617bacbdbeb67c0e49e1ee74ce6ebf96e9329d0df2a5acdef306da975551108e74bd557aff4f9 SHA512 6a68b27dac3705ff532cb79d6b6808071206544a1c653e6a24d46971a5e10edffc7d275834eec4e80d948eb066bb099cae0195c0ab674e68747820e54f0ea64e |
23 |
DIST docutils-0.14.tar.gz 1727105 BLAKE2B d8880918e04ae19ec17ec8aeeaeb44d198a15d7f4c300e08d50b730aa5f753e564391e796b71947c66179ad58fb99e17d11172867d804e0734a17be7dcef3b4b SHA512 1ed72c2ef7d2ca38d1c6f3154b7986ea46f599d9bd826405a5257fdd7740c8626957d6298aa95fb0edea8a24515de22f1ad9b2ecbd59341a1ab7a2bab30f500c |
24 |
DIST docutils-0.15.2.tar.gz 1797388 BLAKE2B d7f78c37346fe30156335f31bab0fbec420980e08b10806b62ca67135388c161daf758378d74ca4650546d519923444e9343605de125295e3ca271d6109adc73 SHA512 b4528c7eba5a27e40f290a9df6894c277d11906d02f6842b9f364b29af9aa1e46f6008c87e4355947bcfa9f2db1cae9f38cf9fa7b8008ba45fa6d685922003a6 |
25 |
+DIST docutils-0.16.tar.gz 1962041 BLAKE2B 64d045d43433e944686b5d9077de0b544d49d041adf398f9b66612db432860853df4a84f4c4b44461789b3039f83e3847547062b2f5bc5d2bde3a0f1ffc9ffba SHA512 4e0c6662924cac6b8f28bb77a4f50eafd637c1083990a23dbd905d8a05362a18dae96e63408ed43b595b693ca755c7961d1282129d3215ed3774af0dddcc0466 |
26 |
|
27 |
diff --git a/dev-python/docutils/docutils-0.16.ebuild b/dev-python/docutils/docutils-0.16.ebuild |
28 |
new file mode 100644 |
29 |
index 00000000000..3fe18c7551a |
30 |
--- /dev/null |
31 |
+++ b/dev-python/docutils/docutils-0.16.ebuild |
32 |
@@ -0,0 +1,72 @@ |
33 |
+# Copyright 1999-2020 Gentoo Authors |
34 |
+# Distributed under the terms of the GNU General Public License v2 |
35 |
+ |
36 |
+EAPI=7 |
37 |
+ |
38 |
+PYTHON_COMPAT=( python{2_7,3_{6,7,8}} pypy3 ) |
39 |
+ |
40 |
+inherit distutils-r1 |
41 |
+ |
42 |
+DESCRIPTION="Python Documentation Utilities" |
43 |
+HOMEPAGE="http://docutils.sourceforge.net/ https://pypi.org/project/docutils/" |
44 |
+#SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" |
45 |
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" |
46 |
+ |
47 |
+LICENSE="BSD-2 GPL-3 public-domain" |
48 |
+SLOT="0" |
49 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
50 |
+IUSE="" |
51 |
+ |
52 |
+BDEPEND="dev-python/setuptools[${PYTHON_USEDEP}] |
53 |
+ dev-python/pygments[${PYTHON_USEDEP}]" |
54 |
+RDEPEND="${DEPEND}" |
55 |
+ |
56 |
+PATCHES=( |
57 |
+ "${FILESDIR}"/${P}-tests.patch |
58 |
+) |
59 |
+ |
60 |
+python_compile_all() { |
61 |
+ # Generate html docs from reStructured text sources. |
62 |
+ |
63 |
+ # Place html4css1.css in base directory to ensure that the generated reference to it is correct. |
64 |
+ cp docutils/writers/html4css1/html4css1.css . || die |
65 |
+ |
66 |
+ cd tools || die |
67 |
+ "${EPYTHON}" buildhtml.py --input-encoding=utf-8 \ |
68 |
+ --stylesheet-path=../html4css1.css, --traceback ../docs || die |
69 |
+} |
70 |
+ |
71 |
+src_test() { |
72 |
+ cd test || die |
73 |
+ distutils-r1_src_test |
74 |
+} |
75 |
+ |
76 |
+python_test() { |
77 |
+ "${EPYTHON}" alltests.py -v || die "Testing failed with ${EPYTHON}" |
78 |
+} |
79 |
+ |
80 |
+python_install() { |
81 |
+ distutils-r1_python_install |
82 |
+ |
83 |
+ # Install tools. |
84 |
+ python_doscript tools/{buildhtml,quicktest}.py |
85 |
+} |
86 |
+ |
87 |
+install_txt_doc() { |
88 |
+ local doc="${1}" |
89 |
+ local dir="txt/$(dirname ${doc})" |
90 |
+ docinto "${dir}" |
91 |
+ dodoc "${doc}" |
92 |
+} |
93 |
+ |
94 |
+python_install_all() { |
95 |
+ local DOCS=( *.txt ) |
96 |
+ local HTML_DOCS=( docs tools docutils/writers/html4css1/html4css1.css ) |
97 |
+ |
98 |
+ distutils-r1_python_install_all |
99 |
+ |
100 |
+ local doc |
101 |
+ while IFS= read -r -d '' doc; do |
102 |
+ install_txt_doc "${doc}" |
103 |
+ done < <(find docs tools -name '*.txt' -print0) |
104 |
+} |
105 |
|
106 |
diff --git a/dev-python/docutils/files/docutils-0.16-tests.patch b/dev-python/docutils/files/docutils-0.16-tests.patch |
107 |
new file mode 100644 |
108 |
index 00000000000..052578c727a |
109 |
--- /dev/null |
110 |
+++ b/dev-python/docutils/files/docutils-0.16-tests.patch |
111 |
@@ -0,0 +1,66 @@ |
112 |
+Index: docutils/test/test_parsers/test_rst/test_directives/test_code.py |
113 |
+=================================================================== |
114 |
+--- docutils/test/test_parsers/test_rst/test_directives/test_code.py (revision 8494) |
115 |
++++ docutils/test/test_parsers/test_rst/test_directives/test_code.py (working copy) |
116 |
+@@ -107,7 +107,7 @@ |
117 |
+ <document source="test data"> |
118 |
+ <literal_block classes="code python testclass" xml:space="preserve"> |
119 |
+ \n\ |
120 |
+- <inline classes="keyword"> |
121 |
++ <inline classes="name builtin"> |
122 |
+ print |
123 |
+ <inline classes="punctuation"> |
124 |
+ ( |
125 |
+@@ -167,7 +167,7 @@ |
126 |
+ <inline classes="ln"> |
127 |
+ 12 \n\ |
128 |
+ \n\ |
129 |
+- <inline classes="keyword"> |
130 |
++ <inline classes="name builtin"> |
131 |
+ print |
132 |
+ <inline classes="punctuation"> |
133 |
+ ( |
134 |
+Index: docutils/test/test_parsers/test_rst/test_directives/test_code_long.py |
135 |
+=================================================================== |
136 |
+--- docutils/test/test_parsers/test_rst/test_directives/test_code_long.py (revision 8494) |
137 |
++++ docutils/test/test_parsers/test_rst/test_directives/test_code_long.py (working copy) |
138 |
+@@ -69,7 +69,7 @@ |
139 |
+ <inline classes="ln"> |
140 |
+ 12 \n\ |
141 |
+ \n\ |
142 |
+- <inline classes="keyword"> |
143 |
++ <inline classes="name builtin"> |
144 |
+ print |
145 |
+ <inline classes="punctuation"> |
146 |
+ ( |
147 |
+Index: docutils/test/test_parsers/test_rst/test_directives/test_tables.py |
148 |
+=================================================================== |
149 |
+--- docutils/test/test_parsers/test_rst/test_directives/test_tables.py (revision 8494) |
150 |
++++ docutils/test/test_parsers/test_rst/test_directives/test_tables.py (working copy) |
151 |
+@@ -45,10 +45,11 @@ |
152 |
+ # some error messages changed in Python 3.3, CPython has backported to 2.7.4, |
153 |
+ # PyPy has not |
154 |
+ csv_eod_error_str = 'unexpected end of data' |
155 |
+-if sys.version_info < (2,7,4) or platform.python_implementation() == 'PyPy': |
156 |
++if sys.version_info < (2,7,4) or (platform.python_implementation() == 'PyPy' |
157 |
++ and sys.version_info < (3,0)): |
158 |
+ csv_eod_error_str = 'newline inside string' |
159 |
+ # pypy adds a line number |
160 |
+-if sys.version_info >= (3, 0) and platform.python_implementation() == 'PyPy': |
161 |
++if platform.python_implementation() == 'PyPy': |
162 |
+ csv_eod_error_str = 'line 1: ' + csv_eod_error_str |
163 |
+ csv_unknown_url = "'bogus.csv'" |
164 |
+ if sys.version_info < (3, 0): |
165 |
+Index: docutils/test/test_parsers/test_rst/test_interpreted.py |
166 |
+=================================================================== |
167 |
+--- docutils/test/test_parsers/test_rst/test_interpreted.py (revision 8494) |
168 |
++++ docutils/test/test_parsers/test_rst/test_interpreted.py (working copy) |
169 |
+@@ -283,7 +283,7 @@ |
170 |
+ <paragraph> |
171 |
+ Python code \n\ |
172 |
+ <literal classes="code testclass python"> |
173 |
+- <inline classes="keyword"> |
174 |
++ <inline classes="name builtin"> |
175 |
+ print |
176 |
+ <inline classes="punctuation"> |
177 |
+ ( |