From 0877a48aa62ff674df43ff67f4ce4c8601cd6b74 Mon Sep 17 00:00:00 2001 From: natsukium Date: Mon, 12 Aug 2024 11:20:30 +0900 Subject: [PATCH 1/5] python312Packages.pycrdt: add updateScript --- pkgs/development/python-modules/pycrdt/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/development/python-modules/pycrdt/default.nix b/pkgs/development/python-modules/pycrdt/default.nix index 6ae1c9c5bd6c..070daf1fdad4 100644 --- a/pkgs/development/python-modules/pycrdt/default.nix +++ b/pkgs/development/python-modules/pycrdt/default.nix @@ -11,6 +11,7 @@ pytestCheckHook, trio, y-py, + nix-update-script, }: buildPythonPackage rec { @@ -49,6 +50,8 @@ buildPythonPackage rec { y-py ]; + passthru.updateScript = nix-update-script { extraArgs = [ "--generate-lockfile" ]; }; + meta = with lib; { description = "CRDTs based on Yrs"; homepage = "https://github.com/jupyter-server/pycrdt"; From 116fe572fa7f5499e465047403d893bd6ef7706a Mon Sep 17 00:00:00 2001 From: natsukium Date: Mon, 12 Aug 2024 11:24:57 +0900 Subject: [PATCH 2/5] python312Packages.pycrdt: 0.9.6 -> 0.9.8 Changelog: https://github.com/jupyter-server/pycrdt/releases/tag/refs/tags/v0.9.8 --- .../python-modules/pycrdt/Cargo.lock | 29 ++++++++++++------- .../python-modules/pycrdt/default.nix | 4 +-- 2 files changed, 20 insertions(+), 13 deletions(-) diff --git a/pkgs/development/python-modules/pycrdt/Cargo.lock b/pkgs/development/python-modules/pycrdt/Cargo.lock index 0da04d69be57..1b6ad5bb32ce 100644 --- a/pkgs/development/python-modules/pycrdt/Cargo.lock +++ b/pkgs/development/python-modules/pycrdt/Cargo.lock @@ -93,6 +93,12 @@ version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" +[[package]] +name = "memchr" +version = "2.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" + [[package]] name = "memoffset" version = "0.9.1" @@ -125,7 +131,7 @@ dependencies = [ [[package]] name = "pycrdt" -version = "0.9.6" +version = "0.9.8" dependencies = [ "pyo3", "yrs", @@ -211,18 +217,18 @@ checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" [[package]] name = "serde" -version = "1.0.204" +version = "1.0.206" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc76f558e0cbb2a839d37354c575f1dc3fdc6546b5be373ba43d95f231bf7c12" +checksum = "5b3e4cd94123dd520a128bcd11e34d9e9e423e7e3e50425cb1b4b1e3549d0284" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.204" +version = "1.0.206" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0cd7e117be63d3c3678776753929474f3b04a43a080c744d6b0ae2a8c28e222" +checksum = "fabfb6138d2383ea8208cf98ccf69cdfb1aff4088460681d84189aa259762f97" dependencies = [ "proc-macro2", "quote", @@ -231,11 +237,12 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.120" +version = "1.0.124" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e0d21c9a8cae1235ad58a00c11cb40d4b1e5c784f1ef2c537876ed6ffd8b7c5" +checksum = "66ad62847a56b3dba58cc891acd13884b9c61138d330c0d7b6181713d4fce38d" dependencies = [ "itoa", + "memchr", "ryu", "serde", ] @@ -257,9 +264,9 @@ checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[package]] name = "syn" -version = "2.0.72" +version = "2.0.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc4b9b9bf2add8093d3f2c0204471e951b2285580335de42f9d2534f3ae7a8af" +checksum = "1fceb41e3d546d0bd83421d3409b1460cc7444cd389341a4c880fe7a042cb3d7" dependencies = [ "proc-macro2", "quote", @@ -268,9 +275,9 @@ dependencies = [ [[package]] name = "target-lexicon" -version = "0.12.15" +version = "0.12.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4873307b7c257eddcb50c9bedf158eb669578359fb28428bef438fec8e6ba7c2" +checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" [[package]] name = "thiserror" diff --git a/pkgs/development/python-modules/pycrdt/default.nix b/pkgs/development/python-modules/pycrdt/default.nix index 070daf1fdad4..7cc073ff81a5 100644 --- a/pkgs/development/python-modules/pycrdt/default.nix +++ b/pkgs/development/python-modules/pycrdt/default.nix @@ -16,14 +16,14 @@ buildPythonPackage rec { pname = "pycrdt"; - version = "0.9.6"; + version = "0.9.8"; pyproject = true; src = fetchFromGitHub { owner = "jupyter-server"; repo = "pycrdt"; rev = "refs/tags/v${version}"; - hash = "sha256-1BGJ6I8ODLyEv566w+vQOsPEqN8nQlZHXTWv0tH0cR0="; + hash = "sha256-W93rLSDcCB9jrxC/Z88ToCkcfMGnCTGjBkVRNk3lLaI="; }; postPatch = '' From f9e28e44d9b6c38811729d8b0f568be8a5025df4 Mon Sep 17 00:00:00 2001 From: natsukium Date: Mon, 12 Aug 2024 11:22:50 +0900 Subject: [PATCH 3/5] python312Packages.ipyvuetify: 1.9.4 -> 1.10.0 --- .../python-modules/ipyvuetify/default.nix | 24 ++++--------------- 1 file changed, 5 insertions(+), 19 deletions(-) diff --git a/pkgs/development/python-modules/ipyvuetify/default.nix b/pkgs/development/python-modules/ipyvuetify/default.nix index 63e3d23c433a..85a1b016ac06 100644 --- a/pkgs/development/python-modules/ipyvuetify/default.nix +++ b/pkgs/development/python-modules/ipyvuetify/default.nix @@ -3,45 +3,31 @@ buildPythonPackage, fetchPypi, # Python Inputs - jupyter-packaging, - jupyterlab, setuptools, - wheel, ipyvue, }: buildPythonPackage rec { pname = "ipyvuetify"; - version = "1.9.4"; + version = "1.10.0"; pyproject = true; # GitHub version tries to run npm (Node JS) src = fetchPypi { inherit pname version; - hash = "sha256-wpwfN68wpj2+lLb4w0erAZYa7OrbVhNfGMv0635oiVs="; + hash = "sha256-h97mqq3zFu4n7Ymnmz08P14PLltjjaBoFzYEhTJUWsE="; }; # drop pynpm which tries to install node_modules postPatch = '' substituteInPlace pyproject.toml \ - --replace-fail "jupyter_packaging~=0.7.9" "jupyter_packaging" \ - --replace-fail "jupyterlab~=3.0" "jupyterlab" \ + --replace-fail '"jupyterlab~=4.0",' "" \ --replace-fail '"pynpm"' "" - - substituteInPlace setup.py \ - --replace-fail "from pynpm import NPMPackage" "" \ - --replace-fail "from generate_source import generate_source" "" \ - --replace-fail 'setup(cmdclass={"egg_info": js_prerelease(egg_info)})' 'setup()' ''; - nativeBuildInputs = [ - jupyter-packaging - jupyterlab - setuptools - wheel - ]; + build-system = [ setuptools ]; - propagatedBuildInputs = [ ipyvue ]; + dependencies = [ ipyvue ]; doCheck = false; # no tests on PyPi/GitHub pythonImportsCheck = [ "ipyvuetify" ]; From f411398f9cffee61dbfb11e73f594a938e05528c Mon Sep 17 00:00:00 2001 From: natsukium Date: Mon, 12 Aug 2024 11:35:33 +0900 Subject: [PATCH 4/5] python312Packages.jupyter-book: add teams.jupyter.members to maintainers jupyter-book became a jupyter subproject --- pkgs/development/python-modules/jupyter-book/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/jupyter-book/default.nix b/pkgs/development/python-modules/jupyter-book/default.nix index 727d5afa83cc..395afa5664cd 100644 --- a/pkgs/development/python-modules/jupyter-book/default.nix +++ b/pkgs/development/python-modules/jupyter-book/default.nix @@ -70,7 +70,7 @@ buildPythonPackage rec { homepage = "https://jupyterbook.org/"; changelog = "https://github.com/executablebooks/jupyter-book/blob/v${version}/CHANGELOG.md"; license = licenses.bsd3; - maintainers = [ ]; + maintainers = teams.jupyter.members; mainProgram = "jupyter-book"; }; } From 07252e21603f23fdc556cff35e753de7202366e2 Mon Sep 17 00:00:00 2001 From: natsukium Date: Mon, 12 Aug 2024 12:26:17 +0900 Subject: [PATCH 5/5] python312Packages.jupyter-book: refactor --- .../python-modules/jupyter-book/default.nix | 59 ++++++++++++++++--- 1 file changed, 51 insertions(+), 8 deletions(-) diff --git a/pkgs/development/python-modules/jupyter-book/default.nix b/pkgs/development/python-modules/jupyter-book/default.nix index 395afa5664cd..47e36e157eb1 100644 --- a/pkgs/development/python-modules/jupyter-book/default.nix +++ b/pkgs/development/python-modules/jupyter-book/default.nix @@ -1,7 +1,7 @@ { lib, buildPythonPackage, - fetchPypi, + fetchFromGitHub, pythonOlder, flit-core, click, @@ -22,6 +22,12 @@ sphinx-togglebutton, sphinxcontrib-bibtex, sphinx-multitoc-numbering, + pytestCheckHook, + texsoup, + jupytext, + pytest-regressions, + pytest-xdist, + sphinx-inline-tabs, }: buildPythonPackage rec { @@ -31,15 +37,18 @@ buildPythonPackage rec { disabled = pythonOlder "3.9"; - src = fetchPypi { - inherit version; - pname = "jupyter_book"; - hash = "sha256-rRXuSanf7Hc6HTBJ2sOFY4KqL5txRKGAEUduZcEbX0Y="; + src = fetchFromGitHub { + owner = "jupyter-book"; + repo = "jupyter-book"; + rev = "refs/tags/v${version}"; + hash = "sha256-NlCMfkfvquonqf7FdaJ7AC9ebM7VSifn+zM7gWh32LQ="; }; - nativeBuildInputs = [ flit-core ]; + build-system = [ flit-core ]; - propagatedBuildInputs = [ + pythonRelaxDeps = [ "myst-parser" ]; + + dependencies = [ click jinja2 jsonschema @@ -65,10 +74,44 @@ buildPythonPackage rec { "jupyter_book.cli.main" ]; + nativeCheckInputs = [ + jupytext + pytest-regressions + pytest-xdist + pytestCheckHook + sphinx-inline-tabs + texsoup + ]; + + preCheck = '' + export HOME=$TMPDIR + ''; + + disabledTests = [ + # touch the network + "test_create_from_cookiecutter" + # flaky? + "test_execution_timeout" + # require texlive + "test_toc" + "test_toc_latex_parts" + "test_toc_latex_urllink" + # WARNING: Executing notebook failed: CellExecutionError [mystnb.exec] + "test_build_dirhtml_from_template" + "test_build_from_template" + "test_build_page" + "test_build_singlehtml_from_template" + ]; + + disabledTestPaths = [ + # require texlive + "tests/test_pdf.py" + ]; + meta = with lib; { description = "Build a book with Jupyter Notebooks and Sphinx"; homepage = "https://jupyterbook.org/"; - changelog = "https://github.com/executablebooks/jupyter-book/blob/v${version}/CHANGELOG.md"; + changelog = "https://github.com/jupyter-book/jupyter-book/blob/${src.rev}/CHANGELOG.md"; license = licenses.bsd3; maintainers = teams.jupyter.members; mainProgram = "jupyter-book";