1 |
commit: 92ec2f777df27519975ef3d28097f9c03d0069f1 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Oct 7 18:24:33 2020 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Oct 7 18:37:43 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=92ec2f77 |
7 |
|
8 |
dev-python/markdown: Bump to 3.3 |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
dev-python/markdown/Manifest | 1 + |
13 |
.../markdown/files/markdown-3.3-pygments-2.7.patch | 89 ++++++++++++++++++++++ |
14 |
dev-python/markdown/markdown-3.3.ebuild | 47 ++++++++++++ |
15 |
3 files changed, 137 insertions(+) |
16 |
|
17 |
diff --git a/dev-python/markdown/Manifest b/dev-python/markdown/Manifest |
18 |
index 55adf34a7a0..f365e761b8c 100644 |
19 |
--- a/dev-python/markdown/Manifest |
20 |
+++ b/dev-python/markdown/Manifest |
21 |
@@ -1,3 +1,4 @@ |
22 |
DIST Markdown-2.6.11.tar.gz 274132 BLAKE2B 0d14d308c97d925db83d71f3b9be5622e77ee4a159fced15c811390b39950e81bff9ffc567f32e878cbc44014640ab0a2f596258cfd0dce6b66029105cec7370 SHA512 4e7dd3e04f181fa2751a359aede301fb29a23b9af74867ff9d1d0fdd051dcd16d04a5891e37aff0b309649c5fd13363802ec7e10fc33896e9453991efcab4a66 |
23 |
DIST Markdown-3.1.1.tar.gz 294136 BLAKE2B 9fd024f64f7aaa774a49f60e312e47bbc2ff0f368f083e4dfd0c38d1f12839dfcf3455f1d0c8cb0b9c851fe0d3a779c70784859f1682703bd6022d57b6548235 SHA512 78f089f2eef5c73d683ac96fd20c87145e243d12b0f230b9b0228b995035fbb084dde40be788679c63637f05956487ad520cc9dd61d133926bf13521aa600090 |
24 |
DIST Markdown-3.2.2.tar.gz 299658 BLAKE2B c5a0337b6633ac3d795885d138ee3c078e36fdcacee659d8908ecdb839e0496c06ac8c721efd16183f03026ebf681e8382cdadd28d910abf5c021fdef9237e2a SHA512 72ce79b0daed4df2d09a458dad24da3e303143307640fb15d15cb10edc6c641d422dcf5043380c1572c4b9ed8f5fc11ec52e28928d8215d687309e4ce9ae3d7c |
25 |
+DIST Markdown-3.3.tar.gz 315253 BLAKE2B 35fbe7f03b9261e1506bb5b2ebb19cfd37e6f1ad2ad6f5464b90c850bec642a5518a6470db640bbf6ded8b589bdfbd83bd0482724b6be6e89dba133d0122d721 SHA512 3f6e29b917135638fba703c3711c8f7baec544293a93bcf3554cad7dbd6a9678a49408c202e70f2cd41813f6a7ec0ff856e1c3888355b1321eb2801eb9552a1c |
26 |
|
27 |
diff --git a/dev-python/markdown/files/markdown-3.3-pygments-2.7.patch b/dev-python/markdown/files/markdown-3.3-pygments-2.7.patch |
28 |
new file mode 100644 |
29 |
index 00000000000..be94fe02875 |
30 |
--- /dev/null |
31 |
+++ b/dev-python/markdown/files/markdown-3.3-pygments-2.7.patch |
32 |
@@ -0,0 +1,89 @@ |
33 |
+From c2904eac1a6daf8a3aaef6af0791b101e1971544 Mon Sep 17 00:00:00 2001 |
34 |
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@g.o> |
35 |
+Date: Wed, 7 Oct 2020 15:01:07 +0200 |
36 |
+Subject: [PATCH] Update tests for pygments-2.7.1 |
37 |
+ |
38 |
+Closes #1030 |
39 |
+--- |
40 |
+ .../extensions/test_code_hilite.py | 22 +++++++++---------- |
41 |
+ .../extensions/test_fenced_code.py | 2 +- |
42 |
+ tox.ini | 2 +- |
43 |
+ 3 files changed, 13 insertions(+), 13 deletions(-) |
44 |
+ |
45 |
+diff --git a/tests/test_syntax/extensions/test_code_hilite.py b/tests/test_syntax/extensions/test_code_hilite.py |
46 |
+index 8d5512d..3e36ae5 100644 |
47 |
+--- a/tests/test_syntax/extensions/test_code_hilite.py |
48 |
++++ b/tests/test_syntax/extensions/test_code_hilite.py |
49 |
+@@ -205,7 +205,7 @@ class TestCodeHiliteClass(TestCase): |
50 |
+ def test_codehilite_linenos_inline(self): |
51 |
+ if has_pygments: |
52 |
+ expected = ( |
53 |
+- '<div class="codehilite"><pre><span></span><code><span class="lineno">1 </span>plain text\n' |
54 |
++ '<div class="codehilite"><pre><span></span><code><span class="linenos">1</span>plain text\n' |
55 |
+ '</code></pre></div>' |
56 |
+ ) |
57 |
+ else: |
58 |
+@@ -259,7 +259,7 @@ class TestCodeHiliteClass(TestCase): |
59 |
+ def test_codehilite_linenostart(self): |
60 |
+ if has_pygments: |
61 |
+ expected = ( |
62 |
+- '<div class="codehilite"><pre><span></span><code><span class="lineno">42 </span>plain text\n' |
63 |
++ '<div class="codehilite"><pre><span></span><code><span class="linenos">42</span>plain text\n' |
64 |
+ '</code></pre></div>' |
65 |
+ ) |
66 |
+ else: |
67 |
+@@ -274,9 +274,9 @@ class TestCodeHiliteClass(TestCase): |
68 |
+ if has_pygments: |
69 |
+ expected = ( |
70 |
+ '<div class="codehilite"><pre><span></span><code>' |
71 |
+- '<span class="lineno">1 </span><span class="hll">line 1\n' |
72 |
+- '</span><span class="lineno">2 </span>line 2\n' |
73 |
+- '<span class="lineno">3 </span><span class="hll">line 3\n' |
74 |
++ '<span class="linenos">1</span><span class="hll">line 1\n' |
75 |
++ '</span><span class="linenos">2</span>line 2\n' |
76 |
++ '<span class="linenos">3</span><span class="hll">line 3\n' |
77 |
+ '</span></code></pre></div>' |
78 |
+ ) |
79 |
+ else: |
80 |
+@@ -291,9 +291,9 @@ class TestCodeHiliteClass(TestCase): |
81 |
+ def test_codehilite_linenos_linenostep(self): |
82 |
+ if has_pygments: |
83 |
+ expected = ( |
84 |
+- '<div class="codehilite"><pre><span></span><code><span class="lineno"> </span>line 1\n' |
85 |
+- '<span class="lineno">2 </span>line 2\n' |
86 |
+- '<span class="lineno"> </span>line 3\n' |
87 |
++ '<div class="codehilite"><pre><span></span><code><span class="linenos"> </span>line 1\n' |
88 |
++ '<span class="linenos">2</span>line 2\n' |
89 |
++ '<span class="linenos"> </span>line 3\n' |
90 |
+ '</code></pre></div>' |
91 |
+ ) |
92 |
+ else: |
93 |
+@@ -308,9 +308,9 @@ class TestCodeHiliteClass(TestCase): |
94 |
+ def test_codehilite_linenos_linenospecial(self): |
95 |
+ if has_pygments: |
96 |
+ expected = ( |
97 |
+- '<div class="codehilite"><pre><span></span><code><span class="lineno">1 </span>line 1\n' |
98 |
+- '<span class="lineno special">2 </span>line 2\n' |
99 |
+- '<span class="lineno">3 </span>line 3\n' |
100 |
++ '<div class="codehilite"><pre><span></span><code><span class="linenos">1</span>line 1\n' |
101 |
++ '<span class="linenos special">2</span>line 2\n' |
102 |
++ '<span class="linenos">3</span>line 3\n' |
103 |
+ '</code></pre></div>' |
104 |
+ ) |
105 |
+ else: |
106 |
+diff --git a/tests/test_syntax/extensions/test_fenced_code.py b/tests/test_syntax/extensions/test_fenced_code.py |
107 |
+index e5de0b7..8fa75f7 100644 |
108 |
+--- a/tests/test_syntax/extensions/test_fenced_code.py |
109 |
++++ b/tests/test_syntax/extensions/test_fenced_code.py |
110 |
+@@ -629,7 +629,7 @@ class TestFencedCode(TestCase): |
111 |
+ if self.has_pygments: |
112 |
+ expected = ( |
113 |
+ '<div class="python codehilite" style="background: #f8f8f8">' |
114 |
+- '<pre style="line-height: 125%"><span></span><code>' |
115 |
++ '<pre style="line-height: 125%; margin: 0;"><span></span><code>' |
116 |
+ '<span style="color: #408080; font-style: italic"># Some python code</span>\n' |
117 |
+ '</code></pre></div>' |
118 |
+ ) |
119 |
+-- |
120 |
+2.28.0 |
121 |
+ |
122 |
|
123 |
diff --git a/dev-python/markdown/markdown-3.3.ebuild b/dev-python/markdown/markdown-3.3.ebuild |
124 |
new file mode 100644 |
125 |
index 00000000000..4d10f26b452 |
126 |
--- /dev/null |
127 |
+++ b/dev-python/markdown/markdown-3.3.ebuild |
128 |
@@ -0,0 +1,47 @@ |
129 |
+# Copyright 1999-2020 Gentoo Authors |
130 |
+# Distributed under the terms of the GNU General Public License v2 |
131 |
+ |
132 |
+EAPI=7 |
133 |
+ |
134 |
+DISTUTILS_USE_SETUPTOOLS=rdepend |
135 |
+PYTHON_COMPAT=( python3_{6..9} pypy3 ) |
136 |
+ |
137 |
+inherit distutils-r1 |
138 |
+ |
139 |
+DESCRIPTION="Python implementation of the markdown markup language" |
140 |
+HOMEPAGE=" |
141 |
+ https://python-markdown.github.io/ |
142 |
+ https://pypi.org/project/Markdown/ |
143 |
+ https://github.com/Python-Markdown/markdown" |
144 |
+SRC_URI="mirror://pypi/M/${PN^}/${P^}.tar.gz" |
145 |
+S="${WORKDIR}/${P^}" |
146 |
+ |
147 |
+LICENSE="BSD" |
148 |
+SLOT="0" |
149 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" |
150 |
+IUSE="doc" |
151 |
+ |
152 |
+# importlib_metadata is only necessary for <python:3.8 according to setup.py |
153 |
+RDEPEND=" |
154 |
+ $(python_gen_cond_dep ' |
155 |
+ dev-python/importlib_metadata[${PYTHON_USEDEP}] |
156 |
+ ' python3_{6,7} pypy3) |
157 |
+" |
158 |
+BDEPEND=" |
159 |
+ test? ( |
160 |
+ dev-python/pygments[${PYTHON_USEDEP}] |
161 |
+ dev-python/pytidylib[${PYTHON_USEDEP}] |
162 |
+ dev-python/pyyaml[${PYTHON_USEDEP}] |
163 |
+ )" |
164 |
+ |
165 |
+PATCHES=( |
166 |
+ "${FILESDIR}"/markdown-3.3-pygments-2.7.patch |
167 |
+) |
168 |
+ |
169 |
+distutils_enable_tests unittest |
170 |
+ |
171 |
+python_install_all() { |
172 |
+ use doc && dodoc -r docs/ |
173 |
+ |
174 |
+ distutils-r1_python_install_all |
175 |
+} |