From 712c5943f7d2766205885d1458825b9151a9fb4e Mon Sep 17 00:00:00 2001 From: natsukium Date: Thu, 12 Oct 2023 11:51:05 +0900 Subject: [PATCH] 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/";