commit: 287ea0b91aa239236497711a14aa0a567f1c814a Author: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org> AuthorDate: Tue Dec 20 19:40:42 2022 +0000 Commit: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org> CommitDate: Tue Dec 20 20:02:58 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=287ea0b9
dev-python/nbconvert: add 7.2.7 Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org> dev-python/nbconvert/Manifest | 1 + dev-python/nbconvert/nbconvert-7.2.7.ebuild | 92 +++++++++++++++++++++++++++++ 2 files changed, 93 insertions(+) diff --git a/dev-python/nbconvert/Manifest b/dev-python/nbconvert/Manifest index fc167936b1bd..a384ef08bf19 100644 --- a/dev-python/nbconvert/Manifest +++ b/dev-python/nbconvert/Manifest @@ -1 +1,2 @@ DIST nbconvert-7.1.0.tar.gz 816516 BLAKE2B c24766716212247dee90ca91a5dbcc65ae2d47b566029eb04e14e65ef94e16f6d7700ea4cc820584bc3b498553196bb5600151a30378ec82f91bf4dde68a5e77 SHA512 5d6e1c09637765e171336528219669a9279a68f3845cb0503b79129b50550f7b5a08526a30de67da6ca132ee5d911743c5afd46773598d6045f3007167f93d5b +DIST nbconvert-7.2.7.tar.gz 867872 BLAKE2B a1f209f3249b22af3153449f16c84500523dfb3efa914ae214021e5ea9174d49a3f71a860d9ccbb375f2651ee2c2a2a6834a1d2558a579dc1bd63f80172d85bc SHA512 4abf4f13a0e210a8a0338200f1dbc3e6d4d71c8565440aa08d443352e01986dada455e1b894171da1e9fa9b226ba0ea267e7fce70fca1256fc92dfe53a47de6c diff --git a/dev-python/nbconvert/nbconvert-7.2.7.ebuild b/dev-python/nbconvert/nbconvert-7.2.7.ebuild new file mode 100644 index 000000000000..b5df64f0bc51 --- /dev/null +++ b/dev-python/nbconvert/nbconvert-7.2.7.ebuild @@ -0,0 +1,92 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=hatchling +PYTHON_COMPAT=( python3_{8..11} ) + +inherit distutils-r1 virtualx + +DESCRIPTION="Converting Jupyter Notebooks" +HOMEPAGE=" + https://nbconvert.readthedocs.io/ + https://github.com/jupyter/nbconvert/ + https://pypi.org/project/nbconvert/ +" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" + +RDEPEND=" + dev-python/beautifulsoup4[${PYTHON_USEDEP}] + dev-python/bleach[${PYTHON_USEDEP}] + dev-python/defusedxml[${PYTHON_USEDEP}] + $(python_gen_cond_dep ' + >=dev-python/importlib_metadata-3.6[${PYTHON_USEDEP}] + ' 3.8 3.9) + >=dev-python/jinja-3.0[${PYTHON_USEDEP}] + >=dev-python/jupyter_core-4.7[${PYTHON_USEDEP}] + dev-python/jupyterlab_pygments[${PYTHON_USEDEP}] + >=dev-python/markupsafe-2.0[${PYTHON_USEDEP}] + >=dev-python/mistune-2.0.2[${PYTHON_USEDEP}] + >=dev-python/nbclient-0.5.0[${PYTHON_USEDEP}] + >=dev-python/nbformat-5.1[${PYTHON_USEDEP}] + dev-python/packaging[${PYTHON_USEDEP}] + >=dev-python/pandocfilters-1.4.1[${PYTHON_USEDEP}] + >=dev-python/pygments-2.4.1[${PYTHON_USEDEP}] + dev-python/tinycss2[${PYTHON_USEDEP}] + >=dev-python/traitlets-5.1.1[${PYTHON_USEDEP}] +" +BDEPEND=" + dev-python/notebook[${PYTHON_USEDEP}] + test? ( + dev-python/ipykernel[${PYTHON_USEDEP}] + >=dev-python/ipywidgets-7[${PYTHON_USEDEP}] + ) +" + +distutils_enable_tests pytest + +src_prepare() { + mkdir -p share/templates/classic/static || die + # tries to refetch stuff even if it's already present + sed -e 's:css = .*:raise PermissionError("You shall not fetch!"):' \ + -i hatch_build.py || die + distutils-r1_src_prepare +} + +python_configure() { + cp "${BROOT}$(python_get_sitedir)/notebook/static/style/style.min.css" \ + share/templates/classic/static/style.css || die +} + +src_test() { + virtx distutils-r1_src_test +} + +python_test() { + local EPYTEST_DESELECT=( + # Missing pyppeteer for now + # TODO: Doesn't skip? + nbconvert/exporters/tests/test_webpdf.py + # Needs pyppeteer too + 'nbconvert/tests/test_nbconvertapp.py::TestNbConvertApp::test_webpdf_with_chromium' + # TODO + nbconvert/exporters/tests/test_qtpng.py::TestQtPNGExporter::test_export + nbconvert/tests/test_nbconvertapp.py::TestNbConvertApp::test_convert_full_qualified_name + nbconvert/tests/test_nbconvertapp.py::TestNbConvertApp::test_post_processor + ) + + nonfatal epytest --pyargs nbconvert || die +} + +pkg_postinst() { + if ! has_version app-text/pandoc ; then + einfo "Pandoc is required for converting to formats other than Python," + einfo "HTML, and Markdown. If you need this functionality, install" + einfo "app-text/pandoc." + fi +}