From a4ab521f6a03c8f5571e0f1063e16b10421e5973 Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Sat, 2 Sep 2023 16:21:14 -0400 Subject: [PATCH 1/5] python3Packages.bokeh: 2.4.3 -> 3.2.2 --- .../python-modules/bokeh/default.nix | 141 +++++++++++------- .../bokeh/hardcode-nodejs-npmjs-paths.patch | 13 +- 2 files changed, 94 insertions(+), 60 deletions(-) diff --git a/pkgs/development/python-modules/bokeh/default.nix b/pkgs/development/python-modules/bokeh/default.nix index 3b7234cdc955..adca1fe308b0 100644 --- a/pkgs/development/python-modules/bokeh/default.nix +++ b/pkgs/development/python-modules/bokeh/default.nix @@ -1,43 +1,68 @@ -{ buildPythonPackage +{ lib +, stdenv +, buildPythonPackage , fetchPypi -, futures ? null -, isPy27 -, isPyPy +, fetchFromGitHub +, pythonOlder +, substituteAll +, colorama +, contourpy , jinja2 -, lib , mock , numpy , nodejs , packaging -, pillow -#, pytestCheckHook# -, pytest -, python-dateutil -, pyyaml -, selenium -, six -, substituteAll -, tornado -, typing-extensions -, pytz -, flaky -, networkx -, beautifulsoup4 -, requests -, nbconvert -, icalendar , pandas -, pythonImportsCheckHook +, pillow +, tornado +, pytestCheckHook +, pyyaml +, setuptools +, setuptools-git-versioning +, xyzservices +, beautifulsoup4 +, channels +, click +, colorcet +, coverage +, firefox +, geckodriver +, isort +, json5 +, nbconvert +, networkx +, psutil +, pygments +, pygraphviz +, pytest +, pytest-asyncio +, pytest-xdist +, pytest-timeout +, requests +, scipy +, selenium +, toml +, typing-extensions }: buildPythonPackage rec { pname = "bokeh"; # update together with panel which is not straightforward - version = "2.4.3"; + version = "3.2.2"; + format = "pyproject"; + + disabled = pythonOlder "3.9"; src = fetchPypi { inherit pname version; - hash = "sha256-7zOAEWGvN5Zlq3o0aE8iCYYeOu/VyAOiH7u5nZSHSwM="; + hash = "sha256-spWbhSTWnsTniGvDZAdEXwqS4fGVMNO/xARSNqG3pv8="; + }; + + src_test = fetchFromGitHub { + owner = "bokeh"; + repo = pname; + rev = "refs/tags/${version}"; + hash = "sha256-PK9iLOCcivr4oF9Riq73dzxGfxzWRk3bdrCCpRrTv5g="; }; patches = [ @@ -48,48 +73,58 @@ buildPythonPackage rec { }) ]; - disabled = isPyPy || isPy27; - nativeBuildInputs = [ - pythonImportsCheckHook - ]; - - pythonImportsCheck = [ - "bokeh" + colorama + nodejs + setuptools + setuptools-git-versioning ]; nativeCheckInputs = [ - mock - pytest - pillow - selenium - pytz - flaky - networkx + pytestCheckHook beautifulsoup4 - requests + channels + click + colorcet + coverage + firefox + geckodriver + isort + json5 nbconvert - icalendar - pandas + networkx + psutil + pygments + pygraphviz + pytest + pytest-asyncio + pytest-xdist + pytest-timeout + requests + scipy + selenium + toml + typing-extensions ]; propagatedBuildInputs = [ - pillow jinja2 - python-dateutil - six - pyyaml - tornado + contourpy numpy packaging - typing-extensions - ] - ++ lib.optionals ( isPy27 ) [ - futures + pandas + pillow + pyyaml + tornado + xyzservices ]; - # This test suite is a complete pain. Somehow it can't find its fixtures. - doCheck = false; + doCheck = false; # need more work + pytestFlagsArray = "tests/test_defaults.py"; + pythonImportsCheck = [ "bokeh" ]; + preCheck = '' + cp -rv ''${src_test}/tests/* ./tests/ + ''; meta = { description = "Statistical and novel interactive HTML plots for Python"; diff --git a/pkgs/development/python-modules/bokeh/hardcode-nodejs-npmjs-paths.patch b/pkgs/development/python-modules/bokeh/hardcode-nodejs-npmjs-paths.patch index f8f33c0021f2..4ebfc7e3f2d6 100644 --- a/pkgs/development/python-modules/bokeh/hardcode-nodejs-npmjs-paths.patch +++ b/pkgs/development/python-modules/bokeh/hardcode-nodejs-npmjs-paths.patch @@ -1,9 +1,8 @@ -diff --git a/bokeh/util/compiler.py b/bokeh/util/compiler.py -index a752aad7d..8af05ff63 100644 ---- a/bokeh/util/compiler.py -+++ b/bokeh/util/compiler.py -@@ -442,8 +442,8 @@ def _detect_nodejs(): - raise RuntimeError('node.js v%s or higher is needed to allow compilation of custom models ' % version + +diff -ru a/src/bokeh/util/compiler.py b/src/bokeh/util/compiler.py +--- a/src/bokeh/util/compiler.py ++++ b/src/bokeh/util/compiler.py +@@ -411,8 +411,8 @@ + raise RuntimeError(f'node.js v{version_repr} or higher is needed to allow compilation of custom models ' + '("conda install nodejs" or follow https://nodejs.org/en/download/)') -_nodejs = None @@ -11,5 +10,5 @@ index a752aad7d..8af05ff63 100644 +_nodejs = "@node_bin@" +_npmjs = "@npm_bin@" - def _nodejs_path(): + def _nodejs_path() -> str: global _nodejs From 611255fd6edb68774d43a2ac182e26dd91bd85e4 Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Sat, 2 Sep 2023 16:29:11 -0400 Subject: [PATCH 2/5] python3Packages.panel: 0.14.4 -> 1.2.2 --- pkgs/development/python-modules/panel/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/panel/default.nix b/pkgs/development/python-modules/panel/default.nix index 0af1060b5d00..3df9474d3780 100644 --- a/pkgs/development/python-modules/panel/default.nix +++ b/pkgs/development/python-modules/panel/default.nix @@ -16,7 +16,7 @@ buildPythonPackage rec { pname = "panel"; - version = "0.14.4"; + version = "1.2.2"; format = "wheel"; @@ -25,7 +25,7 @@ buildPythonPackage rec { # tries to fetch even more artifacts src = fetchPypi { inherit pname version format; - hash = "sha256-3U/PL8cnbNPw3xEM56YZesQEDXTE79yMCSsjdxwfUU0="; + hash = "sha256-RMRjxcUp6MTs001wdNfC/e6diOcgtqrSaVIOSQfPgTs="; }; nativeBuildInputs = [ From f5839272e7a64bc5d6c68c5d999047b615cf394e Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Sat, 2 Sep 2023 18:39:35 -0400 Subject: [PATCH 3/5] python3Packages.livelossplot: 0.5.4 -> 0.5.5 --- pkgs/development/python-modules/livelossplot/default.nix | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/livelossplot/default.nix b/pkgs/development/python-modules/livelossplot/default.nix index 74047e657dd1..dd7a19c22484 100644 --- a/pkgs/development/python-modules/livelossplot/default.nix +++ b/pkgs/development/python-modules/livelossplot/default.nix @@ -13,18 +13,15 @@ buildPythonPackage rec { pname = "livelossplot"; - version = "0.5.4"; + version = "0.5.5"; disabled = pythonOlder "3.6"; - # version number in source is wrong in this release - postPatch = ''substituteInPlace ${pname}/version.py --replace "0.5.3" "0.5.4"''; - src = fetchFromGitHub { owner = "stared"; repo = pname; rev = "v${version}"; - sha256 = "IV6YAidoqVoKvpy+LNNHTPpobiDoGX59bHqJcBtaydk="; + sha256 = "sha256-YU8vX4SubI6txmC/i5fOjcvWfuDFm8+SPmie8Eb1qRs="; }; propagatedBuildInputs = [ bokeh ipython matplotlib numpy ]; From f049a75266f5db7e5b0821c0a4b7e91c72868596 Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Sun, 3 Sep 2023 14:08:26 -0400 Subject: [PATCH 4/5] python3Packages.intake: 0.7.0 -> unstable-2023-08-24 --- pkgs/development/python-modules/intake/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/intake/default.nix b/pkgs/development/python-modules/intake/default.nix index 46c7ab88248a..32fc92bf666e 100644 --- a/pkgs/development/python-modules/intake/default.nix +++ b/pkgs/development/python-modules/intake/default.nix @@ -26,7 +26,7 @@ buildPythonPackage rec { pname = "intake"; - version = "0.7.0"; + version = "unstable-2023-08-24"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -34,8 +34,8 @@ buildPythonPackage rec { src = fetchFromGitHub { owner = pname; repo = pname; - rev = "refs/tags/${version}"; - hash = "sha256-2LUblA8eVCOfVJ6BJayralNiv6EFt6MzR5ptKksVNA4="; + rev = "81b1567a2030adfb22b856b4f63cefe35de68983"; + hash = "sha256-S2PoUN0Bao5VULfHhgbXXowopPLm/njAHO3dIM8ILno="; }; propagatedBuildInputs = [ From 33e5abf1ab9b03a5b394d89e3658cc2649ea69df Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Sun, 3 Sep 2023 22:36:42 -0400 Subject: [PATCH 5/5] python3Packages.intake: fix tests on darwin --- pkgs/development/python-modules/intake/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/intake/default.nix b/pkgs/development/python-modules/intake/default.nix index 32fc92bf666e..e194cfa06086 100644 --- a/pkgs/development/python-modules/intake/default.nix +++ b/pkgs/development/python-modules/intake/default.nix @@ -79,6 +79,8 @@ buildPythonPackage rec { --replace "'pytest-runner'" "" ''; + __darwinAllowLocalNetworking = true; + preCheck = '' export HOME=$(mktemp -d); export PATH="$PATH:$out/bin"; @@ -106,7 +108,7 @@ buildPythonPackage rec { "test_ndarray" "test_python" # Timing-based, flaky on darwin and possibly others - "TestServerV1Source.test_idle_timer" + "test_idle_timer" # arrow-cpp-13 related "test_read" "test_pickle"