python3Packages.jupyter-book: 1.0.4 -> 2.1.0 (#468187)

This commit is contained in:
kirillrdy
2025-12-07 05:42:02 +00:00
committed by GitHub
3 changed files with 81 additions and 96 deletions
@@ -0,0 +1,37 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
# build-system
hatchling,
}:
buildPythonPackage rec {
pname = "hatch-deps-selector";
version = "0.1.2";
pyproject = true;
src = fetchFromGitHub {
owner = "jupyter-book";
repo = "hatch-deps-selector";
tag = "v${version}";
hash = "sha256-AaHVBUDENF3d+yzDt5mvMnfqO+DSYQafMdHNDyEtz2s=";
};
build-system = [
hatchling
];
pythonImportsCheck = [ "hatch_deps_selector" ];
# No tests
doCheck = false;
meta = {
description = "Select additional dependencies for pyproject.toml from the environment";
homepage = "https://github.com/jupyter-book/hatch-deps-selector";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ GaetanLepage ];
};
}
@@ -2,130 +2,76 @@
lib,
buildPythonPackage,
fetchFromGitHub,
fetchNpmDeps,
# build-system
hatch-deps-selector,
hatch-jupyter-builder,
hatch-nodejs-version,
hatchling,
# nativeBuildInputs
nodejs,
npmHooks,
# dependencies
click,
jinja2,
jsonschema,
linkify-it-py,
myst-nb,
myst-parser,
pyyaml,
sphinx,
sphinx-comments,
sphinx-copybutton,
sphinx-external-toc,
sphinx-jupyterbook-latex,
sphinx-design,
sphinx-thebe,
sphinx-book-theme,
sphinx-togglebutton,
sphinxcontrib-bibtex,
sphinx-multitoc-numbering,
jupyter-core,
jupyter-server,
ipykernel,
nodeenv,
# tests
jupytext,
pytest-regressions,
pytest-xdist,
pytestCheckHook,
sphinx-inline-tabs,
texsoup,
writableTmpDirAsHomeHook,
versionCheckHook,
}:
buildPythonPackage rec {
pname = "jupyter-book";
version = "1.0.4";
version = "2.1.0";
pyproject = true;
src = fetchFromGitHub {
owner = "jupyter-book";
repo = "jupyter-book";
tag = "v${version}";
hash = "sha256-04I9mzJMXCpvMiOeMD/Bg8FiymkRgHf/Yo9C1VcyTsw=";
hash = "sha256-Wh3ggKbV0mmcIbpIMsF09UH9ZyVOgpYAx4ppTSUHIKo=";
};
build-system = [ hatchling ];
npmDeps = fetchNpmDeps {
inherit src;
hash = "sha256-oNTVzpjDb4bXIpuZcO/6f82UfOVxbkMMluwOKaNM5tE=";
};
pythonRelaxDeps = [
"myst-parser"
"sphinx"
build-system = [
hatch-deps-selector
hatch-jupyter-builder
hatch-nodejs-version
hatchling
];
nativeBuildInputs = [
nodejs
npmHooks.npmConfigHook
];
# jupyter-book requires node at runtime
propagatedBuildInputs = [
nodejs
];
dependencies = [
click
jinja2
jsonschema
linkify-it-py
myst-nb
myst-parser
pyyaml
sphinx
sphinx-comments
sphinx-copybutton
sphinx-external-toc
sphinx-jupyterbook-latex
sphinx-design
sphinx-thebe
sphinx-book-theme
sphinx-togglebutton
sphinxcontrib-bibtex
sphinx-multitoc-numbering
ipykernel
jupyter-core
jupyter-server
nodeenv
];
pythonImportsCheck = [
"jupyter_book"
"jupyter_book.cli.main"
];
pythonImportsCheck = [ "jupyter_book" ];
# No python tests
nativeCheckInputs = [
jupytext
pytest-regressions
pytest-xdist
pytestCheckHook
sphinx-inline-tabs
texsoup
writableTmpDirAsHomeHook
versionCheckHook
];
disabledTests = [
# touch the network
"test_create_from_cookiecutter"
# flaky?
"test_execution_timeout"
# require texlive
"test_toc"
"test_toc_latex_parts"
"test_toc_latex_urllink"
# AssertionError: assert 'There was an error in building your book' in '1'
"test_build_errors"
# WARNING: Executing notebook failed: CellExecutionError [mystnb.exec]
"test_build_dirhtml_from_template"
"test_build_from_template"
"test_build_page"
"test_build_singlehtml_from_template"
# pytest.PytestUnraisableExceptionWarning: Exception ignored in: <sqlite3.Connection object at 0x115dcc9a0>
# ResourceWarning: unclosed database in <sqlite3.Connection object at 0x115dcc9a0>
"test_clean_book"
"test_clean_html"
"test_clean_html_latex"
"test_clean_latex"
];
disabledTestPaths = [
# require texlive
"tests/test_pdf.py"
];
__darwinAllowLocalNetworking = true;
versionCheckProgramArg = "--version";
meta = {
description = "Build a book with Jupyter Notebooks and Sphinx";
+2
View File
@@ -6679,6 +6679,8 @@ self: super: with self; {
hatch-babel = callPackage ../development/python-modules/hatch-babel { };
hatch-deps-selector = callPackage ../development/python-modules/hatch-deps-selector { };
hatch-docstring-description =
callPackage ../development/python-modules/hatch-docstring-description
{ };