From c133b42520052b01e622af669fb2bdb8457a9570 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Tue, 3 Sep 2024 08:42:48 +0200 Subject: [PATCH 1/4] python312Packages.qtconsole: 5.5.2 -> 5.6.0 Changelog: https://qtconsole.readthedocs.io/en/stable/changelog.html#changes-in-jupyter-qt-console --- .../python-modules/qtconsole/default.nix | 34 +++++++++++-------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/pkgs/development/python-modules/qtconsole/default.nix b/pkgs/development/python-modules/qtconsole/default.nix index b8e1280ceb3d..aa92c94c7476 100644 --- a/pkgs/development/python-modules/qtconsole/default.nix +++ b/pkgs/development/python-modules/qtconsole/default.nix @@ -1,30 +1,34 @@ { lib, buildPythonPackage, - fetchPypi, + fetchFromGitHub, + + # build-system + setuptools, + + # dependencies ipykernel, jupyter-core, jupyter-client, pygments, pyqt5, - pytestCheckHook, - pythonOlder, - pyzmq, qtpy, - setuptools, traitlets, + + # tests + pytestCheckHook, }: buildPythonPackage rec { pname = "qtconsole"; - version = "5.5.2"; + version = "5.6.0"; pyproject = true; - disabled = pythonOlder "3.7"; - - src = fetchPypi { - inherit pname version; - hash = "sha256-a1+xEnSyl0Y3Bq+E3LvVySJzsfYZ5tJdCIdLCohRaYk="; + src = fetchFromGitHub { + owner = "jupyter"; + repo = "qtconsole"; + rev = "refs/tags/${version}"; + hash = "sha256-V82tGAmpvfGeUoewtJXXsBBXx2HNcV9/IMJxJg3bJL8="; }; build-system = [ setuptools ]; @@ -35,7 +39,6 @@ buildPythonPackage rec { jupyter-client pygments pyqt5 - pyzmq qtpy traitlets ]; @@ -47,11 +50,12 @@ buildPythonPackage rec { pythonImportsCheck = [ "qtconsole" ]; - meta = with lib; { + meta = { description = "Jupyter Qt console"; mainProgram = "jupyter-qtconsole"; homepage = "https://qtconsole.readthedocs.io/"; - license = licenses.bsd3; - platforms = platforms.unix; + changelog = "https://qtconsole.readthedocs.io/en/stable/changelog.html#changes-in-jupyter-qt-console"; + license = lib.licenses.bsd3; + platforms = lib.platforms.unix; }; } From 40915d480713583499375d0a2f6a5560892c9d55 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Tue, 3 Sep 2024 08:47:17 +0200 Subject: [PATCH 2/4] python312Packages.qtconsole: add GaetanLepage as maintainer --- pkgs/development/python-modules/qtconsole/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/python-modules/qtconsole/default.nix b/pkgs/development/python-modules/qtconsole/default.nix index aa92c94c7476..858785307a47 100644 --- a/pkgs/development/python-modules/qtconsole/default.nix +++ b/pkgs/development/python-modules/qtconsole/default.nix @@ -57,5 +57,6 @@ buildPythonPackage rec { changelog = "https://qtconsole.readthedocs.io/en/stable/changelog.html#changes-in-jupyter-qt-console"; license = lib.licenses.bsd3; platforms = lib.platforms.unix; + maintainers = with lib.maintainers; [ GaetanLepage ]; }; } From 5ab6f283a63fcae08091f07ffa07f5f9774affe6 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Tue, 3 Sep 2024 08:49:50 +0200 Subject: [PATCH 3/4] python312Packages.spyder-kernels: 2.5.2 -> 3.0.0 Changelog: https://github.com/spyder-ide/spyder-kernels/blob/v3.0.0/CHANGELOG.md --- .../python-modules/spyder-kernels/default.nix | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/pkgs/development/python-modules/spyder-kernels/default.nix b/pkgs/development/python-modules/spyder-kernels/default.nix index f872e2d2bcee..46bf6bb70bb2 100644 --- a/pkgs/development/python-modules/spyder-kernels/default.nix +++ b/pkgs/development/python-modules/spyder-kernels/default.nix @@ -1,14 +1,16 @@ { lib, buildPythonPackage, + fetchFromGitHub, + + # build-system setuptools, + + # dependencies cloudpickle, - fetchPypi, ipykernel, ipython, jupyter-client, - packaging, - pythonOlder, pyxdg, pyzmq, wurlitzer, @@ -16,15 +18,14 @@ buildPythonPackage rec { pname = "spyder-kernels"; - version = "2.5.2"; + version = "3.0.0"; pyproject = true; - disabled = pythonOlder "3.7"; - - src = fetchPypi { - pname = "spyder_kernels"; - inherit version; - hash = "sha256-cfJSkA4CsDlIIMxwSfie1yUkP2/M9kC3bdMpIDxBOWA="; + src = fetchFromGitHub { + owner = "spyder-ide"; + repo = "spyder-kernels"; + rev = "refs/tags/v${version}"; + hash = "sha256-oyPgujvaj2tqouZKuMVDq3gxm0GNrKmeUWqUFUkEMB4="; }; build-system = [ setuptools ]; @@ -34,7 +35,6 @@ buildPythonPackage rec { ipykernel ipython jupyter-client - packaging pyxdg pyzmq wurlitzer From 0d818bd9c80ece638e6fbf942b70b3774bd5eec9 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Tue, 3 Sep 2024 08:25:12 +0200 Subject: [PATCH 4/4] spyder: 5.5.6 -> 6.0.0 Changelog: https://github.com/spyder-ide/spyder/blob/master/CHANGELOG.md --- .../python-modules/spyder/default.nix | 22 ++++++++++++++----- .../spyder/dont-clear-pythonpath.patch | 20 +++++++---------- 2 files changed, 24 insertions(+), 18 deletions(-) diff --git a/pkgs/development/python-modules/spyder/default.nix b/pkgs/development/python-modules/spyder/default.nix index b3d91997fc90..febf8c66dd3f 100644 --- a/pkgs/development/python-modules/spyder/default.nix +++ b/pkgs/development/python-modules/spyder/default.nix @@ -5,11 +5,14 @@ pythonOlder, # dependencies + aiohttp, + asyncssh, atomicwrites, chardet, cloudpickle, cookiecutter, diff-match-patch, + fzf, intervaltree, jedi, jellyfish, @@ -20,6 +23,7 @@ numpydoc, pickleshare, psutil, + pygithub, pygments, pylint-venv, pyls-spyder, @@ -27,7 +31,7 @@ pyqtwebengine, python-lsp-black, python-lsp-server, - pyxdg, + pyuca, pyzmq, qdarkstyle, qstylizer, @@ -39,21 +43,21 @@ scipy, setuptools, spyder-kernels, + superqt, textdistance, three-merge, watchdog, + yarl, }: buildPythonPackage rec { pname = "spyder"; - version = "5.5.6"; + version = "6.0.0"; pyproject = true; - disabled = pythonOlder "3.8"; - src = fetchPypi { inherit pname version; - hash = "sha256-lYtmn0oBXFw5EFDrbv+o2EZWqL/Eel9GrbopeEnYK90="; + hash = "sha256-/UUtSpSkt1hJeIZfBLe8owP82jRx02kUF6TdfCsq6CY="; }; patches = [ ./dont-clear-pythonpath.patch ]; @@ -64,11 +68,14 @@ buildPythonPackage rec { ]; dependencies = [ + aiohttp + asyncssh atomicwrites chardet cloudpickle cookiecutter diff-match-patch + fzf intervaltree jedi jellyfish @@ -79,6 +86,7 @@ buildPythonPackage rec { numpydoc pickleshare psutil + pygithub pygments pylint-venv pyls-spyder @@ -86,7 +94,7 @@ buildPythonPackage rec { pyqtwebengine python-lsp-black python-lsp-server - pyxdg + pyuca pyzmq qdarkstyle qstylizer @@ -97,9 +105,11 @@ buildPythonPackage rec { rtree scipy spyder-kernels + superqt textdistance three-merge watchdog + yarl ] ++ python-lsp-server.optional-dependencies.all; # There is no test for spyder diff --git a/pkgs/development/python-modules/spyder/dont-clear-pythonpath.patch b/pkgs/development/python-modules/spyder/dont-clear-pythonpath.patch index abb021e39554..0d623c69ee34 100644 --- a/pkgs/development/python-modules/spyder/dont-clear-pythonpath.patch +++ b/pkgs/development/python-modules/spyder/dont-clear-pythonpath.patch @@ -1,25 +1,21 @@ diff --git a/spyder/app/start.py b/spyder/app/start.py -index 97b08a600..66486e510 100644 +index ad9f2b8d0..442b4fc46 100644 --- a/spyder/app/start.py +++ b/spyder/app/start.py -@@ -6,20 +6,8 @@ +@@ -6,16 +6,8 @@ # (see spyder/__init__.py for details) # ----------------------------------------------------------------------------- - + -# Remove PYTHONPATH paths from sys.path before other imports to protect against -# shadowed standard libraries. import os import sys -if os.environ.get('PYTHONPATH'): - for path in os.environ['PYTHONPATH'].split(os.pathsep): -- if os.name == 'nt' and 'pkgs' in path: -- # Don't remove pynsist installer entry for 'pkgs' directory -- continue -- else: -- try: -- sys.path.remove(path.rstrip(os.sep)) -- except ValueError: -- pass - +- try: +- sys.path.remove(path.rstrip(os.sep)) +- except ValueError: +- pass + # Standard library imports import ctypes