From 04789c1996da7de587d494332e4dcf93d9c9bfd9 Mon Sep 17 00:00:00 2001 From: natsukium Date: Thu, 12 Oct 2023 11:22:37 +0900 Subject: [PATCH 1/2] python311Packages.ipython-genutils: rename from ipython_genutils --- pkgs/development/python-modules/ipympl/default.nix | 4 ++-- .../{ipython_genutils => ipython-genutils}/default.nix | 5 +++-- pkgs/development/python-modules/ipython-sql/default.nix | 4 ++-- .../python-modules/jupyter-contrib-nbextensions/default.nix | 4 ++-- pkgs/development/python-modules/nbclassic/default.nix | 4 ++-- pkgs/development/python-modules/qtconsole/default.nix | 4 ++-- pkgs/top-level/python-aliases.nix | 1 + pkgs/top-level/python-packages.nix | 2 +- 8 files changed, 15 insertions(+), 13 deletions(-) rename pkgs/development/python-modules/{ipython_genutils => ipython-genutils}/default.nix (86%) diff --git a/pkgs/development/python-modules/ipympl/default.nix b/pkgs/development/python-modules/ipympl/default.nix index 9863064f16ea..f461659c6500 100644 --- a/pkgs/development/python-modules/ipympl/default.nix +++ b/pkgs/development/python-modules/ipympl/default.nix @@ -3,7 +3,7 @@ , pythonOlder , fetchPypi , ipykernel -, ipython_genutils +, ipython-genutils , ipywidgets , matplotlib , numpy @@ -25,7 +25,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ ipykernel - ipython_genutils + ipython-genutils ipywidgets matplotlib numpy diff --git a/pkgs/development/python-modules/ipython_genutils/default.nix b/pkgs/development/python-modules/ipython-genutils/default.nix similarity index 86% rename from pkgs/development/python-modules/ipython_genutils/default.nix rename to pkgs/development/python-modules/ipython-genutils/default.nix index 2283444c23db..673370d34060 100644 --- a/pkgs/development/python-modules/ipython_genutils/default.nix +++ b/pkgs/development/python-modules/ipython-genutils/default.nix @@ -6,11 +6,12 @@ }: buildPythonPackage rec { - pname = "ipython_genutils"; + pname = "ipython-genutils"; version = "0.2.0"; src = fetchPypi { - inherit pname version; + pname = "ipython_genutils"; + inherit version; sha256 = "eb2e116e75ecef9d4d228fdc66af54269afa26ab4463042e33785b887c628ba8"; }; diff --git a/pkgs/development/python-modules/ipython-sql/default.nix b/pkgs/development/python-modules/ipython-sql/default.nix index 8853b066ecb6..2fc59859ab2a 100644 --- a/pkgs/development/python-modules/ipython-sql/default.nix +++ b/pkgs/development/python-modules/ipython-sql/default.nix @@ -3,7 +3,7 @@ , fetchFromGitHub , pythonOlder , ipython -, ipython_genutils +, ipython-genutils , pandas , prettytable , pytest @@ -29,7 +29,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ ipython - ipython_genutils + ipython-genutils prettytable sqlalchemy sqlparse diff --git a/pkgs/development/python-modules/jupyter-contrib-nbextensions/default.nix b/pkgs/development/python-modules/jupyter-contrib-nbextensions/default.nix index 73ba031e3992..5656043625f3 100644 --- a/pkgs/development/python-modules/jupyter-contrib-nbextensions/default.nix +++ b/pkgs/development/python-modules/jupyter-contrib-nbextensions/default.nix @@ -1,7 +1,7 @@ { lib , buildPythonPackage , fetchFromGitHub -, ipython_genutils +, ipython-genutils , jupyter-contrib-core , jupyter-highlight-selected-word , jupyter-nbextensions-configurator @@ -23,7 +23,7 @@ buildPythonPackage rec { }; propagatedBuildInputs = [ - ipython_genutils + ipython-genutils jupyter-contrib-core jupyter-highlight-selected-word jupyter-nbextensions-configurator diff --git a/pkgs/development/python-modules/nbclassic/default.nix b/pkgs/development/python-modules/nbclassic/default.nix index 79febaf68518..d4730414006c 100644 --- a/pkgs/development/python-modules/nbclassic/default.nix +++ b/pkgs/development/python-modules/nbclassic/default.nix @@ -3,7 +3,7 @@ , buildPythonPackage , fetchPypi , ipykernel -, ipython_genutils +, ipython-genutils , jinja2 , jupyter-client , jupyter-core @@ -39,7 +39,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ argon2-cffi ipykernel - ipython_genutils + ipython-genutils jinja2 jupyter-client jupyter-core diff --git a/pkgs/development/python-modules/qtconsole/default.nix b/pkgs/development/python-modules/qtconsole/default.nix index b963798f6560..a49b63eaeb15 100644 --- a/pkgs/development/python-modules/qtconsole/default.nix +++ b/pkgs/development/python-modules/qtconsole/default.nix @@ -4,7 +4,7 @@ , ipykernel , jupyter-core , jupyter-client -, ipython_genutils +, ipython-genutils , pygments , pyqt5 , pytestCheckHook @@ -28,7 +28,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ ipykernel - ipython_genutils + ipython-genutils jupyter-core jupyter-client pygments diff --git a/pkgs/top-level/python-aliases.nix b/pkgs/top-level/python-aliases.nix index a791b8ccd86c..fc73f642cf2d 100644 --- a/pkgs/top-level/python-aliases.nix +++ b/pkgs/top-level/python-aliases.nix @@ -185,6 +185,7 @@ mapAliases ({ imgaug = throw "imgaug has been removed as it is no longer maintained"; # added 2023-07-10 intreehook = throw "intreehooks has been removed because it is obsolete as a backend-path key was added to PEP 517"; # added 2023-04-11 ipaddress = throw "ipaddress has been removed because it is no longer required since python 2.7."; # added 2022-05-30 + ipython_genutils = ipython-genutils; # added 2023-10-12 influxgraph = throw "influxgraph has been removed because it is no longer maintained"; # added 2022-07-10 itanium_demangler = itanium-demangler; # added 2022-10-17 jaraco_classes = jaraco-classes; # added 2023-07-14 diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 6e845f54927d..3c007b4e637e 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5412,7 +5412,7 @@ self: super: with self; { ipytablewidgets = callPackage ../development/python-modules/ipytablewidgets { }; - ipython_genutils = callPackage ../development/python-modules/ipython_genutils { }; + ipython-genutils = callPackage ../development/python-modules/ipython-genutils { }; ipython = callPackage ../development/python-modules/ipython { }; From 712c5943f7d2766205885d1458825b9151a9fb4e Mon Sep 17 00:00:00 2001 From: natsukium Date: Thu, 12 Oct 2023 11:51:05 +0900 Subject: [PATCH 2/2] python311Packages.ipython-genutils: refactor --- .../ipython-genutils/default.nix | 25 +++++++++++++++---- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/ipython-genutils/default.nix b/pkgs/development/python-modules/ipython-genutils/default.nix index 673370d34060..e3a7b6c0a444 100644 --- a/pkgs/development/python-modules/ipython-genutils/default.nix +++ b/pkgs/development/python-modules/ipython-genutils/default.nix @@ -1,26 +1,41 @@ { lib , buildPythonPackage , fetchPypi +, setuptools , nose -, glibcLocales +, pytestCheckHook }: buildPythonPackage rec { pname = "ipython-genutils"; version = "0.2.0"; + pyproject = true; src = fetchPypi { pname = "ipython_genutils"; inherit version; - sha256 = "eb2e116e75ecef9d4d228fdc66af54269afa26ab4463042e33785b887c628ba8"; + hash = "sha256-6y4RbnXs751NIo/cZq9UJpr6JqtEYwQuM3hbiHxii6g="; }; - nativeCheckInputs = [ nose glibcLocales ]; + nativeBuildInputs = [ + setuptools + ]; - checkPhase = '' - LC_ALL="en_US.UTF-8" nosetests -v ipython_genutils/tests + nativeCheckInputs = [ + nose + pytestCheckHook + ]; + + preCheck = '' + substituteInPlace ipython_genutils/tests/test_path.py \ + --replace "setUp" "setup_method" \ + --replace "tearDown" "teardown_method" ''; + pythonImportsCheck = [ + "ipython_genutils" + ]; + meta = { description = "Vestigial utilities from IPython"; homepage = "https://ipython.org/";