1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 setuptools,
6 nose,
7 pytestCheckHook,
8 pythonAtLeast,
9}:
10
11buildPythonPackage rec {
12 pname = "ipython-genutils";
13 version = "0.2.0";
14 pyproject = true;
15
16 # uses the imp module, upstream says "DO NOT USE"
17 disabled = pythonAtLeast "3.12";
18
19 src = fetchPypi {
20 pname = "ipython_genutils";
21 inherit version;
22 hash = "sha256-6y4RbnXs751NIo/cZq9UJpr6JqtEYwQuM3hbiHxii6g=";
23 };
24
25 nativeBuildInputs = [ setuptools ];
26
27 nativeCheckInputs = [
28 nose
29 pytestCheckHook
30 ];
31
32 preCheck = ''
33 substituteInPlace ipython_genutils/tests/test_path.py \
34 --replace "setUp" "setup_method" \
35 --replace "tearDown" "teardown_method"
36 '';
37
38 pythonImportsCheck = [ "ipython_genutils" ];
39
40 meta = {
41 description = "Vestigial utilities from IPython";
42 homepage = "https://ipython.org/";
43 license = lib.licenses.bsd3;
44 };
45}