1 |
commit: a7719631a05d613c8d6c2daaca0c983502db2b1b |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Jul 5 02:29:52 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Jul 5 02:30:07 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a7719631 |
7 |
|
8 |
dev-python/nbconvert: add tinycss2 dep |
9 |
|
10 |
Closes: https://bugs.gentoo.org/856289 |
11 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
12 |
|
13 |
dev-python/nbconvert/nbconvert-6.5.0-r2.ebuild | 83 ++++++++++++++++++++++++++ |
14 |
1 file changed, 83 insertions(+) |
15 |
|
16 |
diff --git a/dev-python/nbconvert/nbconvert-6.5.0-r2.ebuild b/dev-python/nbconvert/nbconvert-6.5.0-r2.ebuild |
17 |
new file mode 100644 |
18 |
index 000000000000..171e7a133509 |
19 |
--- /dev/null |
20 |
+++ b/dev-python/nbconvert/nbconvert-6.5.0-r2.ebuild |
21 |
@@ -0,0 +1,83 @@ |
22 |
+# Copyright 1999-2022 Gentoo Authors |
23 |
+# Distributed under the terms of the GNU General Public License v2 |
24 |
+ |
25 |
+EAPI=8 |
26 |
+ |
27 |
+DISTUTILS_USE_PEP517=setuptools |
28 |
+PYTHON_COMPAT=( python3_{8..10} ) |
29 |
+ |
30 |
+inherit distutils-r1 |
31 |
+ |
32 |
+DESCRIPTION="Converting Jupyter Notebooks" |
33 |
+HOMEPAGE=" |
34 |
+ https://nbconvert.readthedocs.io/ |
35 |
+ https://github.com/jupyter/nbconvert/ |
36 |
+ https://pypi.org/project/nbconvert/ |
37 |
+" |
38 |
+SRC_URI=" |
39 |
+ mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz |
40 |
+" |
41 |
+ |
42 |
+LICENSE="BSD" |
43 |
+SLOT="0" |
44 |
+KEYWORDS="~amd64 ~arm ~arm64 ~riscv ~x86" |
45 |
+ |
46 |
+RDEPEND=" |
47 |
+ dev-python/beautifulsoup4[${PYTHON_USEDEP}] |
48 |
+ dev-python/bleach[${PYTHON_USEDEP}] |
49 |
+ dev-python/defusedxml[${PYTHON_USEDEP}] |
50 |
+ >=dev-python/entrypoints-0.2.2[${PYTHON_USEDEP}] |
51 |
+ dev-python/jinja[${PYTHON_USEDEP}] |
52 |
+ dev-python/jupyter_core[${PYTHON_USEDEP}] |
53 |
+ dev-python/jupyterlab_pygments[${PYTHON_USEDEP}] |
54 |
+ >=dev-python/markupsafe-2.0[${PYTHON_USEDEP}] |
55 |
+ >=dev-python/mistune-2.0.2[${PYTHON_USEDEP}] |
56 |
+ dev-python/nbclient[${PYTHON_USEDEP}] |
57 |
+ dev-python/nbformat[${PYTHON_USEDEP}] |
58 |
+ >=dev-python/pandocfilters-1.4.1[${PYTHON_USEDEP}] |
59 |
+ dev-python/pygments[${PYTHON_USEDEP}] |
60 |
+ dev-python/tinycss2[${PYTHON_USEDEP}] |
61 |
+ >=dev-python/traitlets-5.1.1[${PYTHON_USEDEP}] |
62 |
+ dev-python/testpath[${PYTHON_USEDEP}] |
63 |
+ www-servers/tornado[${PYTHON_USEDEP}] |
64 |
+" |
65 |
+BDEPEND=" |
66 |
+ test? ( |
67 |
+ dev-python/pebble[${PYTHON_USEDEP}] |
68 |
+ dev-python/ipykernel[${PYTHON_USEDEP}] |
69 |
+ dev-python/ipywidgets[${PYTHON_USEDEP}] |
70 |
+ >=dev-python/jupyter_client-4.2[${PYTHON_USEDEP}] |
71 |
+ ) |
72 |
+" |
73 |
+ |
74 |
+distutils_enable_tests pytest |
75 |
+ |
76 |
+PATCHES=( |
77 |
+ "${FILESDIR}"/${P}-mistune-2.patch |
78 |
+) |
79 |
+ |
80 |
+src_test() { |
81 |
+ mkdir -p "${HOME}/.local" || die |
82 |
+ cp -r share "${HOME}/.local/" || die |
83 |
+ distutils-r1_src_test |
84 |
+} |
85 |
+ |
86 |
+python_test() { |
87 |
+ local EPYTEST_DESELECT=( |
88 |
+ # Missing pyppeteer for now |
89 |
+ # TODO: Doesn't skip? |
90 |
+ nbconvert/exporters/tests/test_webpdf.py |
91 |
+ # Needs pyppeteer too |
92 |
+ 'nbconvert/tests/test_nbconvertapp.py::TestNbConvertApp::test_webpdf_with_chromium' |
93 |
+ ) |
94 |
+ |
95 |
+ epytest --pyargs nbconvert |
96 |
+} |
97 |
+ |
98 |
+pkg_postinst() { |
99 |
+ if ! has_version app-text/pandoc ; then |
100 |
+ einfo "Pandoc is required for converting to formats other than Python," |
101 |
+ einfo "HTML, and Markdown. If you need this functionality, install" |
102 |
+ einfo "app-text/pandoc." |
103 |
+ fi |
104 |
+} |