Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/nbconvert/
Date: Sun, 04 Sep 2022 08:05:31
Message-Id: 1662278698.d4422e7029cf434666427f9c0b4a635e85d9ba75.mgorny@gentoo
1 commit: d4422e7029cf434666427f9c0b4a635e85d9ba75
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Sat Sep 3 11:05:43 2022 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Sun Sep 4 08:04:58 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d4422e70
7
8 dev-python/nbconvert: Bump to 7.0.0
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 dev-python/nbconvert/Manifest | 1 +
13 dev-python/nbconvert/nbconvert-7.0.0.ebuild | 95 +++++++++++++++++++++++++++++
14 2 files changed, 96 insertions(+)
15
16 diff --git a/dev-python/nbconvert/Manifest b/dev-python/nbconvert/Manifest
17 index eede60c44cb4..9b70905386fd 100644
18 --- a/dev-python/nbconvert/Manifest
19 +++ b/dev-python/nbconvert/Manifest
20 @@ -1,3 +1,4 @@
21 DIST nbconvert-6.5.0.tar.gz 908377 BLAKE2B a91c6c93e9e33f90c5c7f19743e20aa6cf88e5dd29be4ee777744d96037dddd15294858776c8391d79f5436e929fb1b623a3f11f6c4cbcf60728dba2204b6e2e SHA512 4e0d26d581435525f819c05207890cc7cbeaff786a16c354f0356c9bc50111a724a92b7e15445a0cf0ebf1e1c2f0ff064a2c8722267f66dd8677ad82b5e61714
22 DIST nbconvert-6.5.2.tar.gz 910454 BLAKE2B 0c80232697e1ecf31af17f10ae5ad9bcfaec89e06ab5f81c87f231f2abd585c23977d0b154363e72f6066a97d04ec96184b0d8325e5aaa399a1a9335109577bb SHA512 b955bd55bc1f69700652faae12a585230d939877551f792eebee57936a293b9b54caff5eb1bcaf996efa38c737f141069d4af2c2959b8b6318966c9020e8a2f5
23 DIST nbconvert-6.5.3.tar.gz 910597 BLAKE2B a6336f2227098caf1d59aafa770fc3dd3466160329d5344dc760425cdde7ca35ad8d1e8839fe3189d1623a682a61ea3feedb7fdfdb2ec349e6ec890d873a936a SHA512 a991d8a66fe7a244d3943974d93eb13769016843d37f6c9dcf4ba84dd16511364f45b5020060bf2c10d35fe52b4df4b678d045eedc883d3156a6cb689a977525
24 +DIST nbconvert-7.0.0.tar.gz 860724 BLAKE2B f333145df45f7295259e964f50a68ab6c33f195c42f68deddc87d23348761cc816e9bfbe4552b2a0276ca28a9f0820183f118b531cdb1f1f8ca4355dc5486f3d SHA512 3c458a757060f1c9165c5ae7f0b5aad53be29d50ac385a37567007a5ac4fe67987592c66ba048e3659d089e9ac1ef210f14b750b5215bc181197c86257223b85
25
26 diff --git a/dev-python/nbconvert/nbconvert-7.0.0.ebuild b/dev-python/nbconvert/nbconvert-7.0.0.ebuild
27 new file mode 100644
28 index 000000000000..4328f080d184
29 --- /dev/null
30 +++ b/dev-python/nbconvert/nbconvert-7.0.0.ebuild
31 @@ -0,0 +1,95 @@
32 +# Copyright 1999-2022 Gentoo Authors
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=8
36 +
37 +DISTUTILS_USE_PEP517=hatchling
38 +PYTHON_COMPAT=( python3_{8..10} )
39 +
40 +inherit distutils-r1 virtualx
41 +
42 +DESCRIPTION="Converting Jupyter Notebooks"
43 +HOMEPAGE="
44 + https://nbconvert.readthedocs.io/
45 + https://github.com/jupyter/nbconvert/
46 + https://pypi.org/project/nbconvert/
47 +"
48 +SRC_URI="
49 + mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz
50 +"
51 +
52 +LICENSE="BSD"
53 +SLOT="0"
54 +KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
55 +
56 +RDEPEND="
57 + dev-python/lxml[${PYTHON_USEDEP}]
58 + dev-python/beautifulsoup4[${PYTHON_USEDEP}]
59 + dev-python/bleach[${PYTHON_USEDEP}]
60 + dev-python/defusedxml[${PYTHON_USEDEP}]
61 + $(python_gen_cond_dep '
62 + >=dev-python/importlib_metadata-3.6[${PYTHON_USEDEP}]
63 + ' 3.8 3.9)
64 + >=dev-python/jinja-3.0[${PYTHON_USEDEP}]
65 + >=dev-python/jupyter_core-4.7[${PYTHON_USEDEP}]
66 + dev-python/jupyterlab_pygments[${PYTHON_USEDEP}]
67 + >=dev-python/markupsafe-2.0[${PYTHON_USEDEP}]
68 + >=dev-python/mistune-2.0.2[${PYTHON_USEDEP}]
69 + >=dev-python/nbclient-0.5.0[${PYTHON_USEDEP}]
70 + >=dev-python/nbformat-5.1[${PYTHON_USEDEP}]
71 + dev-python/packaging[${PYTHON_USEDEP}]
72 + >=dev-python/pandocfilters-1.4.1[${PYTHON_USEDEP}]
73 + >=dev-python/pygments-2.4.1[${PYTHON_USEDEP}]
74 + dev-python/tinycss2[${PYTHON_USEDEP}]
75 + >=dev-python/traitlets-5.1.1[${PYTHON_USEDEP}]
76 +"
77 +BDEPEND="
78 + dev-python/notebook[${PYTHON_USEDEP}]
79 + test? (
80 + dev-python/ipykernel[${PYTHON_USEDEP}]
81 + >=dev-python/ipywidgets-7[${PYTHON_USEDEP}]
82 + )
83 +"
84 +
85 +distutils_enable_tests pytest
86 +
87 +src_prepare() {
88 + mkdir share/templates/classic/static || die
89 + # tries to refetch stuff even if it's already present
90 + sed -e 's:css = .*:raise PermissionError("You shall not fetch!"):' \
91 + -i hatch_build.py || die
92 + distutils-r1_src_prepare
93 +}
94 +
95 +python_configure() {
96 + cp "${BROOT}$(python_get_sitedir)/notebook/static/style/style.min.css" \
97 + share/templates/classic/static/style.css || die
98 +}
99 +
100 +src_test() {
101 + virtx distutils-r1_src_test
102 +}
103 +
104 +python_test() {
105 + local EPYTEST_DESELECT=(
106 + # Missing pyppeteer for now
107 + # TODO: Doesn't skip?
108 + nbconvert/exporters/tests/test_webpdf.py
109 + # Needs pyppeteer too
110 + 'nbconvert/tests/test_nbconvertapp.py::TestNbConvertApp::test_webpdf_with_chromium'
111 + # TODO
112 + nbconvert/exporters/tests/test_qtpng.py::TestQtPNGExporter::test_export
113 + nbconvert/tests/test_nbconvertapp.py::TestNbConvertApp::test_convert_full_qualified_name
114 + nbconvert/tests/test_nbconvertapp.py::TestNbConvertApp::test_post_processor
115 + )
116 +
117 + nonfatal epytest -p no:xvfb --pyargs nbconvert || die
118 +}
119 +
120 +pkg_postinst() {
121 + if ! has_version app-text/pandoc ; then
122 + einfo "Pandoc is required for converting to formats other than Python,"
123 + einfo "HTML, and Markdown. If you need this functionality, install"
124 + einfo "app-text/pandoc."
125 + fi
126 +}