python311Packages.ipython-genutils: refactor

This commit is contained in:
natsukium 2023-10-12 11:51:05 +09:00
parent 04789c1996
commit 712c5943f7
No known key found for this signature in database
GPG Key ID: 9EA45A31DB994C53

View File

@ -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/";