aboutsummaryrefslogtreecommitdiffstats
path: root/community/jupyter-nbconvert/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'community/jupyter-nbconvert/APKBUILD')
-rw-r--r--community/jupyter-nbconvert/APKBUILD72
1 files changed, 72 insertions, 0 deletions
diff --git a/community/jupyter-nbconvert/APKBUILD b/community/jupyter-nbconvert/APKBUILD
new file mode 100644
index 00000000000..547acc7c974
--- /dev/null
+++ b/community/jupyter-nbconvert/APKBUILD
@@ -0,0 +1,72 @@
+# Contributor: Aiden Grossman <agrossman154@yahoo.com>
+# Maintainer: Aiden Grossman <agrossman154@yahoo.com>
+pkgname=jupyter-nbconvert
+pkgver=7.16.3
+pkgrel=1
+pkgdesc="Notebook conversion tool for jupyter"
+url="https://github.com/jupyter/nbconvert"
+arch="noarch"
+license="BSD-3-Clause"
+depends="
+ jupyter-nbclient
+ jupyter-nbformat
+ py3-beautifulsoup4
+ py3-bleach
+ py3-defusedxml
+ py3-jinja2
+ py3-jupyter_core
+ py3-jupyterlab_pygments
+ py3-markupsafe
+ py3-mistune
+ py3-packaging
+ py3-pandocfilters
+ py3-pygments
+ py3-qt5
+ py3-tinycss2
+ py3-traitlets
+ "
+checkdepends="py3-pytest-xdist py3-ipykernel py3-flaky"
+makedepends="py3-gpep517 py3-hatchling py3-installer"
+subpackages="$pkgname-pyc"
+source="$pkgname-$pkgver.tar.gz::https://github.com/jupyter/nbconvert/archive/refs/tags/v$pkgver.tar.gz
+ deprecation-warnings.patch
+ "
+builddir="$srcdir/nbconvert-$pkgver"
+
+build() {
+ gpep517 build-wheel \
+ --wheel-dir .dist \
+ --output-fd 3 3>&1 >&2
+}
+
+check() {
+ export PYTHONWARNINGS="ignore::DeprecationWarning"
+ # Use a virtual environment as the tests need an actual installation to work
+ python3 -m venv --clear --without-pip --system-site-packages .testenv
+ ./.testenv/bin/python3 -m installer .dist/*.whl
+ # TestWebPDFExporter and TestNbConvertApp both require chromium to run tests
+ # Last two tests fail on missing templates
+ ./.testenv/bin/python3 -m pytest -n auto \
+ -k 'not TestWebPDFExporter and not TestNbConvertApp' \
+ --deselect nbconvert/exporters/tests/test_export.py::TestExport::test_export_disabled \
+ --deselect nbconvert/exporters/tests/test_export.py::TestExport::test_export_filename \
+ --deselect nbconvert/exporters/tests/test_export.py::TestExport::test_export_filestream \
+ --deselect nbconvert/exporters/tests/test_export.py::TestExport::test_export_nbnode \
+ --deselect nbconvert/exporters/tests/test_exporter.py::TestExporter::test_get_export_names_disable \
+ --deselect nbconvert/exporters/tests/test_exporter.py::TestExporter::test_get_exporter_disable_config_exporters \
+ --deselect nbconvert/exporters/tests/test_script.py::TestScriptExporter::test_export \
+ --deselect nbconvert/exporters/tests/test_script.py::TestScriptExporter::test_export_config_transfer \
+ --deselect nbconvert/exporters/tests/test_script.py::TestScriptExporter::test_export_python \
+ --deselect nbconvert/exporters/tests/test_templateexporter.py::TestExporter::test_absolute_template_name_5x_compatibility_display_priority \
+ --deselect nbconvert/exporters/tests/test_templateexporter.py::TestExporter::test_absolute_template_name_5x_compatibility_full
+}
+
+package() {
+ python3 -m installer -d "$pkgdir" \
+ .dist/*.whl
+}
+
+sha512sums="
+5392f663cf10f944d7efec4a9f070a99b3eec53a67749bf3532bd7e0b183b97492c8d749320fea96facbe489e7019a861b75ac6a1d7a6453b3574293daf51949 jupyter-nbconvert-7.16.3.tar.gz
+02f53525c21be24c6891b0ad046cb1554f0ade1db47f1c935784dd496386b167167439a9c8152eaf73261fb775b52c0af9b7ad89064185fb52b74882f84e83d0 deprecation-warnings.patch
+"